summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vd_ffmpeg.c
Commit message (Collapse)AuthorAgeFilesLines
* vd_ffmpeg: Minor code simplification.reimar2010-10-271-1/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31336 b3059339-0415-0410-9bf9-f77b7e298cf2
* vd_ffmpeg: fix aspect ratio problems with recent FFmpegUoti Urpala2010-10-161-0/+2
| | | | | | | | | | The code left ctx->last_sample_aspect_ratio at 0/0 when allocating a context. In older FFmpeg versions av_cmp_q() against 0/0 always said the numbers are equal; but this changed recently, triggering incorrect overwrite of container aspect ratio. The logic looks like it'd need further fixes, but for now just initialize last_sample_aspect_ratio to 0/1; this should restore the previous behavior from before FFmpeg changes, which worked well enough for the most common cases.
* vd_ffmpeg: fix calloc/av_free mixupUoti Urpala2010-10-161-7/+4
| | | | | | avctx->palctrl was allocated with calloc() but freed with av_freep(). Free it with free() instead. Also change the main decoder context allocation to use talloc.
* cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf"Uoti Urpala2010-05-291-1/+2
| | | | | | | Change 'struct vf_instance' pointer arguments to more standard style as in the subject. Also some other minor formatting fixes. Patch by Diego Biurrun.
* vd_ffmpeg: remove #ifdef for old FFmpeg-mt versionsUoti Urpala2010-05-071-6/+0
| | | | | The #ifdef is obsolete since trying to compile against the relevant old versions will fail for other reasons.
* vd_ffmpeg: use skip_frame instead of deprecated hurry_up fieldUoti Urpala2010-05-041-1/+6
|
* Delete things related to old translation systemUoti Urpala2010-03-101-1/+0
| | | | | Remove the help/ subdirectory, configure code to create toplevel help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
* Merge svn changes up to r30643Uoti Urpala2010-03-101-1/+13
|\
| * Handle negative height in draw_slice from FFmpeg in vd_ffmpeg.c, since atreimar2010-02-171-1/+13
| | | | | | | | | | | | | | | | | | | | least vo_xv and vo_sdl can not handle it and the scale filter seems to work fine either way. The FFmpeg vp3/Theora decoder produces such slices. Fixes bug #1646. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30630 b3059339-0415-0410-9bf9-f77b7e298cf2
| * libmpcodecs: Mark functions not used outside of their files as static.diego2010-02-161-2/+4
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30597 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Mark all ad_info_t/vd_info_t structure declarations as const.diego2010-02-121-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30546 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30463Uoti Urpala2010-03-091-0/+18
|\| | | | | | | | | | | Note that r30455 is wrong, that commit does not in fact change the default behavior as claimed in the commit message. It only breaks "-af-adv force=0", which was already pretty much useless though.
| * Add missing license headers to all files in the libmpcodecs directory.diego2010-01-301-0/+18
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30463 b3059339-0415-0410-9bf9-f77b7e298cf2
* | vd_ffmpeg: fix compilation with neither VDPAU nor XvMC enabledUoti Urpala2010-01-211-2/+0
| | | | | | | | | | | | | | | | | | The get_format() function was defined under #if CONFIG_XVMC || CONFIG_VDPAU but recent commit ca217f4557c3cff4f2bf33e605ce13e662e84a92 added an unconditional reference to it, causing linking to fail with an undefined reference if neither feature was enabled. Fix by removing the #if, there's no reason reason why it would be needed.
* | vd_ffmpeg: FFmpeg-mt changed has_b_frames API, updateUoti Urpala2010-01-201-1/+2
| |
* | vd_ffmpeg: move redundant info messages to MSGL_V levelUoti Urpala2010-01-201-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | Move two messages printed when using VDPAU/XvMC to MSGL_V level: "[VD_FFMPEG] XVMC-accelerated MPEG-2.\n" "[VD_FFMPEG] Trying pixfmt=%d.\n" The first is redundant because this info is normally visible from the decoder name, and it was also incorrectly printed in the VDPAU case too. Add a different MSGL_V message for VDPAU. Also make all these messages not translatable.
* | vd_ffmpeg: disable callbacks for threaded decodingUoti Urpala2010-01-201-38/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MPlayer's slice and direct rendering related callbacks are not safe to call from other threads, so disable those features if more than one decoding thread is specified. This should fix some issues when using threaded decoding with formats other than h264 (in the h264 case the callbacks were already disabled for other reasons). This commit moves most of the code that sets special avctx parameters for VDPAU and XvMC. Before that was done after avcodec_open() based on the selected output image format; now it's done before avcodec_open() based on the capabilities of the selected decoder. At least the code selecting the thread count must be before avcodec_open(), and I think there is no reason to try to keep the previous structure otherwise either. The image format-based approach was implemented by Reimar with the intended goal of eventually selecting between software and VDPAU decoders under one FFmpeg decoder type. I consider that goal to be questionable, and the approach certainly made the existing code significantly messier for no functionality benefit.
* | Merge svn changes up to r30236Uoti Urpala2010-01-081-0/+2
|\|
| * Avoid the error message "Unsupported PixelFormat -1" for ffh264 decodingzuxy2010-01-071-0/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30233 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30165Uoti Urpala2010-01-081-0/+4
|\|
| * Also pass the 4th plane for planar formats on to libavcodec.reimar2009-12-311-0/+4
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30156 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30136Uoti Urpala2009-12-301-4/+6
|\| | | | | | | Ignore another broken correct-pts change in 30134.
| * Support mp_image with allocated palette.reimar2009-12-261-4/+6
| | | | | | | | | | | | | | | | Fixes playback and a memory leak for FFmpeg codecs which use reget_buffer with paletted data, e.g. cdgraphics. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30116 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29962Uoti Urpala2009-11-231-5/+2
|\|
| * Add const to draw_slice argument to match what FFmpeg expects for ↵reimar2009-11-221-2/+2
| | | | | | | | | | | | draw_horiz_band. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29956 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use avcodec_align_dimensions to appropriately align width and height inreimar2009-11-171-5/+2
| | | | | | | | | | | | | | get_buffer instead of reimplementing it badly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29921 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Map AV_LOG_VERBOSE to MSGL_V in order to avoid spurious log output.diego2009-11-101-0/+1
| | | | | | | | | | | | | | based on a patch by On2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29884 b3059339-0415-0410-9bf9-f77b7e298cf2
* | core: Add support for decoder reordering of pts valuesUoti Urpala2009-11-211-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a mode where libavcodec's reordered_opaque feature is used to associate container packet timestamps with decoded frames. This should improve behavior at least for MPEG files with interlaced h264; the previous code does not cope well with the libavformat demuxer producing two field packets with separate timestamps but the libavcodec h264 decoder only producing a single output frame for those two packets (so half the timestamps have no associated output frame). The current libavformat mpeg demuxer seems to finally work with interlaced h264 files and produce valid timestamps which are useful with a mode like this. By default MPlayer now selects between this new mode and the old one automatically based on the number of timestamp problems they cause; by default the new mode is used if both seem to work. The new option -pts-association-mode can be used to force a particular mode. If correct-pts mode is disabled this has no effect on timing. Also remove the "EXPERIMENTAL" marker from the manpage description of -correct-pts.
* | av_log callback handling overhaulUoti Urpala2009-10-311-51/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move av_log callback handling from vd_ffmpeg.c to a new file av_log.c and install the callback immediately when starting the program. Main functionality improvements of the new code: - The old version only installed the callback when opening an FFmpeg video decoder. If nothing had triggered that then av_log() messages from other sources (libavformat, audio decoding, swscale usage) bypassed MPlayer's output system completely. Now the callback is always installed. - Current av_log message severity levels are handled correctly. The old code used MSGL_ERR for some messages that should be MSGL_V. - Message type is now set for libavformat contexts (MSGT_DEMUXER / MSGT_MUXER). - The old code did "mp_msg_test(type, mp_level)" before actually determining the type, so that it always used MSGT_FIXME. This led to some messages being incorrectly dropped in case the user had specified module-specific verbosity levels. The old check in question was originally motivated by performance problems when there were a lot of callbacks; however it's not clear whether the part about it skipping the type determination was intentional (most of the performance problems must have come from the way the original code used snprintf) and in my tests current FFmpeg libraries have not generated unreasonable amounts of callbacks anyway.
* | Merge svn changes up to r29752Uoti Urpala2009-10-061-0/+2
|\| | | | | | | | | | | | | | | | | As part of merging subtitle-in-terminal changes make update_subtitles() only clear existing subtitles if called with the reset argument, and not try to set new ones. Later calls should set the needed new subtitles, and this change avoids some problems with trying to set subtitles when mp_property_sub() in command.c gets called from initialization code before full initialization.
| * Make sure avctx->codec_type and codec_id are set, since libavcodecreimar2009-09-231-0/+2
| | | | | | | | | | | | | | | | | | currently requires that. That probably is an unintended API change and should be fixed/reverted in lavc but it hurts little to workaround here. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29709 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29455Uoti Urpala2009-07-291-1/+1
|\|
| * Replace WORDS_BIGENDIAN by HAVE_BIGENDIAN in all internal code.diego2009-07-261-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29443 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Replace libavutil internal header #includes with MPlayer copiesUoti Urpala2009-07-261-1/+1
| | | | | | | | | | | | Change #include lines for libavutil/intreadwrite.h, libavutil/bswap.h and libavutil/x86_cpu.h to use the MPlayer file under ffmpeg_files/ instead.
* | Merge svn changes up to r29412Uoti Urpala2009-07-071-2/+7
|\|
| * Switch to avcodec_decode_video2 to allow a hack that makes PNG decode correctlyreimar2009-06-011-2/+7
| | | | | | | | | | | | | | again instead of in CorePNG delta mode. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29340 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Translation system changes part 2: replace macros by stringsAmar Takhar2009-07-071-11/+11
| | | | | | | | | | Replace all MSGTR_ macros in the source by the corresponding English string.
* | Translation system changes part 1: wrap translated stringsAmar Takhar2009-07-071-11/+11
| | | | | | | | | | Replace mp_msg() calls which have a translated string as the format argument with mp_tmsg and add _() around all other translated strings.
* | vd_ffmpeg.c: Use FFmpeg-mt compatible code for codec delayUoti Urpala2009-04-301-2/+8
| | | | | | | | | | | | | | | | This code to calculate codec delay should work with both with regular FFmpeg and FFmeg-mt. This MPlayer version is not completely compatible with current FFmpeg-mt though, since it has a build system change which matches upstream FFmpeg but hasn't been integrated in FFmpeg-mt yet (RUNTIME_CPUDETECT -> CONFIG_RUNTIME_CPUDETECT rename).
* | Merge svn changes up to r29117Uoti Urpala2009-04-011-2/+2
|\|
| * Use MP_MAX_PLANES as size of arrays passed to mpcodecs_draw_slice.reimar2009-03-291-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29098 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Allow to use vdpau temporal deinterlacers with hardware accelerated decoding.cehoyos2009-03-181-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28991 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28862Uoti Urpala2009-03-071-19/+27
|\|
| * Add another hack to work-around the currently completely inconsistent way inreimar2009-03-031-1/+5
| | | | | | | | | | | | | | which libavcodec sets AVCodecContext::pix_fmt. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28801 b3059339-0415-0410-9bf9-f77b7e298cf2
| * 10l, replace a tab that slipped in.reimar2009-03-011-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28767 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Create a set_format_params function that sets all the special options neededreimar2009-03-011-19/+23
| | | | | | | | | | | | | | | | | | for XvMC/VDPAU acceleration in a single place. This should get closer to working with selecting acceleration via pix_fmt instead of via a special codec for each method. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28766 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28690Uoti Urpala2009-02-211-2/+2
|\|
| * Return PIX_FMT_NONE if the video system refuses all other formats.iive2009-02-191-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28662 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28655Uoti Urpala2009-02-191-0/+1
|\|
| * Handle mpcodecs_get_image returning NULL, FFmpeg most of the time handlesreimar2009-02-181-0/+1
| | | | | | | | | | | | | | it correctly (VDPAU and probably H.264 currently don't, MPEG1/2 does etc.). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28643 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28641Uoti Urpala2009-02-181-8/+18
|\| | | | | | | | | | | | | | | Convert vo_x11_border (used in vo_gl/gl2 though the vo_gl_border macro) to use a wrapper macro in old-style VOs which do not provide a VO object argument. Before this function had an explicit global_vo argument in vo_gl/gl2. New vo_vdpau uses it too so use the same mechanism as most other functions.
| * Set avctx->opaque already at init instead of decode so it can be used inreimar2009-02-171-1/+1
| | | | | | | | | | | | | | | | get_format and get_buffer would not crash if called during avcodec_open. Patch by Gwenole Beauchesne [gbeauchesne splitted-desktop com] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28636 b3059339-0415-0410-9bf9-f77b7e298cf2
| * cosmetics: Remove stray empty lines.diego2009-02-171-2/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28630 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix #endif comment.cehoyos2009-02-161-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28619 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add support for VDPAU video out, including hardware decoding.reimar2009-02-161-4/+16
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28617 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28610Uoti Urpala2009-02-161-297/+174
|\|
| *