Commit Graph

866 Commits

Author SHA1 Message Date
Vittorio Giovara d75190aa93 mpegvideo: move REBASE_PICTURE where it is used
Drop an unused #undef from h264 decoder.
2014-12-15 15:46:34 +01:00
Michael Niedermayer 894545cb71 mpegvideo: exit cleanly when ff_mpv_common_frame_size_change() fails
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-12-03 12:52:53 +00:00
Michael Niedermayer 7a38987f24 mpegvideo: free_context_frame() cannot fail, make it return void
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-03 12:52:04 +00:00
Michael Niedermayer c45eeb2dbf mpegvideo: replace assert about interlaced EC with debug av_log()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-03 12:51:43 +00:00
Vittorio Giovara 898e9a24ef mpegvideo: check mpv return value
CC: libav-stable@libav.org
Bug-Id: CID 1238786
2014-11-11 11:26:02 +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 835f798c7d mpegvideo: cosmetics: Lowercase ugly uppercase MPV_ function name prefixes 2014-08-15 01:26:33 -07:00
John Stebbins 998c9f15d1 idct: remove call to ff_idctdsp_init from ff_MPV_common_init
One step in untangling the mpegvideo code and fixing some problems in
the order that initialization is being done in h263dec and h261dec.
2014-08-14 07:58:49 -07:00
James Yu 16e6652286 aarch64: NEON intrinsics dct_unquantize_h263.
Intrinsics only used on aarch64 since the existing ARMv7 NEON asm
is slightly faster (Cortex-A9, gcc-4.8, micro-benchmarks and full
decoding time).

Signed-off-by: James Yu <james.yu@linaro.org>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-07-21 23:18:29 +02:00
Diego Biurrun 2d60444331 dsputil: Split motion estimation compare bits off into their own context 2014-07-17 09:07:10 -07:00
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