Commit Graph

856 Commits

Author SHA1 Message Date
Diego Biurrun e3fcb14347 dsputil: Split off IDCT bits into their own context 2014-06-30 07:58:46 -07:00
Diego Biurrun fab9df63a3 dsputil: Split off global motion compensation bits into a separate context 2014-06-23 09:58:17 -07:00
Diego Biurrun 7b9ef8d701 mpeg: Split error resilience bits off into a separate file 2014-06-22 17:36:37 -07:00
Diego Biurrun 8d695dc411 mpeg: Mark ff_mpeg_set_erpic() static
It is not used outside of the file.
2014-06-22 06:28:46 -07:00
Diego Biurrun e74433a8e6 dsputil: Split clear_block*/fill_block* off into a separate context 2014-06-18 14:07:23 -07:00
Janne Grunau 0ddc53dabb mpegvideo: synchronize AVFrame pointers in ERContext fully
Since error resilience uses AVFrame pointers instead of references it
has to copy NULL pointers too. After a codec flush the last/next frame
pointers in MpegEncContext are NULL and the old pointers remaining in
ERContext are invalid. Fixes a crash in vlc for android thumbnailer.
Reported and debugged by Adrien Maglo <magsoft@videolan.org>.
2014-06-11 21:28:27 +02:00
Diego Biurrun 368f50359e dsputil: Split off quarterpel bits into their own context 2014-05-29 06:48:31 -07:00
Diego Biurrun 3832a65901 dsputil: Move ff_alternate_*_scan tables to mpegvideo 2014-05-29 06:41:15 -07:00
Anton Khirnov a871ef0cc9 hwaccel: Rename priv_data_size to frame_priv_data_size
This describes more accurately what this field is for.
2014-05-11 14:59:07 +02:00
Anton Khirnov c1f92d1358 mpegvideo: remove unused MpegEncContext.b4_stride 2014-04-29 14:49:42 +02:00
wm4 f6774f905f mpegvideo: operate with pointers to AVFrames instead of whole structs
The most interesting parts are initialization in ff_MPV_common_init() and
uninitialization in ff_MPV_common_end().

ff_mpeg_unref_picture and ff_thread_release_buffer have additional NULL
checks for Picture.f, because these functions can be called on
uninitialized or partially initialized Pictures.

NULL pointer checks are added to ff_thread_release_buffer() stub function.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-04-09 02:12:19 +02:00
Vittorio Giovara 6f6c029464 lavc: drop ff_pixfmt_list_420 2014-03-23 01:56:58 +01:00
Vittorio Giovara be039278b5 mpegvideo: move ff_draw_horiz_band() to mpegutils.c
Drop the mpegvideo dependency for svq3 in configure.
2014-03-16 23:05:39 +01:00
Vittorio Giovara e0c16e4e32 mpegvideo: move mpegvideo formats-related defines to mpegutils.h 2014-03-16 23:04:41 +01:00
Vittorio Giovara d66e305bd1 er: move relevant fields from Picture to ERPicture
This is done to disentangle ER from mpegvideo. In order to use a
classic Picture, callers can use ff_mpeg_set_erpic() or use a custom function
to set the fields. Please note that buffers need to be allocated before
calling ff_er_frame_end().
2014-03-16 23:01:00 +01:00
Vittorio Giovara 75af13a0e4 mpegvideo: directly use frames in ff_draw_horiz_band() 2014-03-16 23:01:00 +01:00
Diego Biurrun 54b2ce7418 mpeg: Drop unused parameters from ff_draw_horiz_band() 2014-01-29 16:37:23 +01:00
Janne Grunau fb0c9d41d6 avutil: remove timer.h include from internal.h
Added libavutil/timer.h include to all files with {START,STOP}_TIMER.
2014-01-25 21:50:20 +01:00
Anton Khirnov 024db24912 mpegvideo: allocate edges when encoding.
Allocating edges will be removed from generic code, so the encoder must
handle this explicitly.
2014-01-20 12:50:14 +01:00
Anton Khirnov ebfe622bb1 mpegvideo: drop support for real (non-emulated) edges
Several decoders disable those anyway and 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 (and those decoders
relevant enough) to justify the added complexity.
2014-01-09 09:41:19 +01:00
Anton Khirnov a3a55645f0 mpegvideo: remove disabled bfin asm
It has been disabled as 'broken' over 3 years ago in b716a792
2014-01-03 16:54:24 +01:00
Anton Khirnov a4d0c6e050 mpegvideo: move dct_unquantize functions up to avoid forward declarations 2014-01-03 16:54:00 +01:00
Anton Khirnov aec25b1c46 mpegvideo: split the encoding-only parts of frame_start() into a separate function
This introduces some code duplication. However, much of it should go
away once the decoders stop using MpegEncContext.
2014-01-03 16:52:49 +01:00
Anton Khirnov feded990e3 mpegvideo: set reference/pict_type on generated reference frames
Otherwise the generic code will unref them, which can then result in
last_picture_ptr == current_picture_ptr, which causes deadlocks at least
in rv40.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-03 16:36:43 +01:00
Anton Khirnov 2d1f4288dd mpegvideo: call av_frame_unref() instead of avcodec_get_frame_defaults().
This is a temporary workaround to allow deprecating
avcodec_get_frame_defaults(). The proper solution will be using a
properly allocated AVFrame in Picture.
2013-12-11 20:39:55 +01:00
Anton Khirnov b06c8bce02 mpegvideo: remove an unneeded call to avcodec_get_frame_defaults().
ff_mpeg_unref_picture() already resets the frame.
2013-12-11 20:39:55 +01:00
Anton Khirnov 282c6a1a0e mpegvideo: make ff_release_unused_pictures() static
It is only called from one place in mpegvideo.c now. Also remove the
remove_current parameter, which is always 1.
2013-12-05 13:26:50 +01:00
Anton Khirnov c99307caee mpegvideo: make frame_size_alloc() static.
It is not called from outside of mpegvideo.c anymore.
2013-12-05 13:25:46 +01:00
Anton Khirnov 0b0a7a751d mpegvideo: move encode-only parts of common_end() to encode_end() 2013-12-05 13:25:26 +01:00
Anton Khirnov d0d111d059 mpegvideo: remove commented out cruft from ff_MPV_frame_end() 2013-12-05 13:25:15 +01:00
Anton Khirnov 381a722562 mpegvideo: split the encoding-only parts of ff_MPV_frame_end() into a separate function 2013-12-05 13:23:55 +01:00
Anton Khirnov b7254288d2 mpegvideo: do not update last_non_b_pict_type in update_thread_context()
It is used for encoding only.
2013-12-05 13:23:33 +01:00
Anton Khirnov 1f8eb69079 mpegvideo: move encoding-only initialization from common_init() to encode_init() 2013-12-05 13:23:03 +01:00
Anton Khirnov bedf952bb8 mpegvideo: move setting encoding-only vars from common_defaults() to encode_defaults() 2013-12-05 13:22:55 +01:00
Anton Khirnov 2cab011f0f mpegvideo: don't copy input_picture_number in update_thread_context()
It is encoding-only, frame threading is not used for encoding.
2013-12-05 13:22:46 +01:00
Anton Khirnov e62a43f6b1 mpeg4videodec: move MpegEncContext.time_increment_bits to Mpeg4DecContext
The field remains in MpegEncContext for use in the encoder.
2013-11-29 14:19:47 +01:00
Anton Khirnov ee8af2dd99 mpeg4videodec: move MpegEncContext.shape to Mpeg4DecContext 2013-11-29 14:19:47 +01:00
Kostya Shishkov 16e7b189c5 mpegvideo: Fix swapping of UV planes for VCR2 2013-11-19 02:05:51 +01:00
Anton Khirnov a553c6a347 lavc: use buf[0] instead of data[0] in checks whether a frame is allocated
data[0] may be NULL for valid frames with hwaccel pixel formats.
2013-11-18 18:09:48 +01:00
Diego Biurrun 19e30a58fc Deprecate obsolete XvMC hardware decoding support
XvMC has long ago been superseded by newer acceleration APIs, such as
VDPAU, and few downstreams still support it. Furthermore XvMC is not
implemented within the hwaccel framework, but requires its own specific
code in the MPEG-1/2 decoder, which is a maintenance burden.
2013-11-13 21:07:45 +01:00
Diego Biurrun c7f7bfc9e3 Remove all Alpha architecture optimizations
Alpha has been end-of-lifed and no more test machines are available.
2013-11-13 20:45:49 +01:00
Anton Khirnov ccc7129845 lavc: deprecate FF_DEBUG_MV and remove all traces of its use
It has not been actually used since
37045e4229, when the broken vismv code was
removed.
2013-10-31 20:21:13 +01:00
Luca Barbato 72072bf9de mpegvideo: Drop a faulty assert
That check is easily reachable by faulty input.

CC:libav-stable@libav.org
Reported-by: Torsten Sadowski <tsadowski@gmx.net>
2013-10-23 10:49:48 +02:00
Martin Storsjö 5f24fe82e5 mpegvideo: Initialize chroma_*_shift and codec_tag even if the size is 0
This fixes breakage in a few fate tests on certain setups
(that for some reason didn't break on OS X) after the previous
commit (8812a8057). Currently, some video streams are initialized
in ff_MPV_common_init with width/height set at 0 and only changed
to a proper video size with ff_MPV_common_frame_size_change later.

The breakage was diagnosed by Anton Khirnov.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-24 14:02:23 +03:00
Diego Biurrun 70dd8892bf mpegvideo: Replace arch initialization ifdeffery by standard conditionals 2013-08-28 23:59:24 +02:00
Rémi Denis-Courmont 578ea75a9e vdpau: remove old-style decoders
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-05 11:15:49 +02:00
Janne Grunau 3eae9b030c mpegvideo: unref buffers in ff_mpeg_unref_picture on frame size changes
ff_mpeg_unref_picture clears the flag indicating that the frame needs to
be reallocated after a frame size change. Since we have now reference
counted buffers we can unref the buffers immediately.
2013-05-22 15:40:12 +02:00
Janne Grunau 4b79668154 mpegvideo: unref old current_picture before allocating a new one
Allows decoding with only three frame buffers with frame reference
counting. Fixes VAAPI based decoding in vlc which uses only three
frame buffers for the mpegvideo-based codecs.
2013-05-19 23:02:35 +02:00
Jindrich Makovicka 259af1b923 mpegvideo: allocate sufficiently large scratch buffer for interlaced vid
MPV_decode_mb_internal needs 3 * 16 * linesize bytes of scratch buffer

For interlaced content, linesize is multiplied by two after the allocation
of the scratch buffer, and the dest_cr pointer ends past the buffer.

This patch makes ff_mpv_frame_size_alloc allocate a total of
(aligned line_size) * 2 * 16 * 3 bytes, which suffices even for the
interlaced case.

CC:libav-stable@libav.org

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-05-17 07:49:05 +02:00
Diego Biurrun 2832ea26f3 Remove commented-out debug #define cruft 2013-05-16 00:23:30 +02:00