diff options
71 files changed, 990 insertions, 94 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index d0920e4a45..af89e6e64f 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -3423,6 +3423,11 @@ Select the driver to use as source to overlay on top of X11. .PD 1 . .TP +.B vdpau (with \-vc ffmpeg12vdpau, ffwmv3vdpau, ffvc1vdpau or ffh264vdpau) +Video output that uses VDPAU to decode video via hardware. +Also supports displaying of software-decoded video. +. +.TP .B xvmc (X11 with \-vc ffmpeg12mc only) Video output driver that uses the XvMC (X Video Motion Compensation) extension of XFree86 4.x to speed up MPEG-1/2 and VCR2 decoding. diff --git a/DOCS/xml/en/bugreports.xml b/DOCS/xml/en/bugreports.xml index d541230f4f..de716463b2 100644 --- a/DOCS/xml/en/bugreports.xml +++ b/DOCS/xml/en/bugreports.xml @@ -113,6 +113,8 @@ you need to go back. earlier version, so if you do not make a backup copy of your original source tree, you will have to recompile everything in it when you come back to the present.) +Alternatively you may use <ulink url="http://ccache.samba.org/">ccache</ulink> +to speed up compilation. </para> <para> diff --git a/DOCS/xml/ru/bugreports.xml b/DOCS/xml/ru/bugreports.xml index 1b28ff3592..8a33797b4a 100644 --- a/DOCS/xml/ru/bugreports.xml +++ b/DOCS/xml/ru/bugreports.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- synced with r28201 --> +<!-- synced with r28615 --> <appendix id="bugreports"> <title>Как сообщать об ошибках</title> @@ -109,6 +109,8 @@ make (Как правило необходимо выполнять 'make distclean' до перекомпиляции более ранней версии, поэтому при отсутствии сохраненной копии Вам придется перекомпилировать весь проект.) +Также Вы можете использовать <ulink url="http://ccache.samba.org/">ccache</ulink> +для ускорения компиляции. </para> <para> @@ -633,6 +633,7 @@ SRCS_MPLAYER-$(TDFXVID) += libvo/vo_tdfx_vid.c SRCS_MPLAYER-$(TGA) += libvo/vo_tga.c SRCS_MPLAYER-$(V4L2) += libvo/vo_v4l2.c SRCS_MPLAYER-$(V4L2) += libao2/ao_v4l2.c +SRCS_MPLAYER-$(VDPAU) += libvo/vo_vdpau.c SRCS_MPLAYER-$(VESA) += libvo/gtf.c libvo/vo_vesa.c libvo/vesa_lvo.c SRCS_MPLAYER-$(VIDIX) += libvo/vo_cvidix.c \ libvo/vosub_vidix.c \ @@ -382,6 +382,7 @@ Video output: --enable-xmga enable mga_vid X11 video output [autodetect] --enable-xv enable Xv video output [autodetect] --enable-xvmc enable XvMC acceleration [disable] + --enable-vdpau enable VDPAU acceleration [autodetect] --enable-vm enable XF86VidMode support [autodetect] --enable-xinerama enable Xinerama support [autodetect] --enable-x11 enable X11 video output [autodetect] @@ -523,7 +524,7 @@ _libavcodec_a=auto _libamr_nb=auto _libamr_wb=auto _libavdecoders_all=`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'` -_libavdecoders=` echo $_libavdecoders_all | sed -e 's/ LIB[A-Z0-9_]*_DECODER//g' -e s/MPEG4AAC_DECODER// -e s/H264_VDPAU_DECODER// -e s/MPEG_VDPAU_DECODER// -e s/MPEG1_VDPAU_DECODER// -e s/VC1_VDPAU_DECODER// -e s/WMV3_VDPAU_DECODER// ` +_libavdecoders=` echo $_libavdecoders_all | sed -e 's/ LIB[A-Z0-9_]*_DECODER//g' -e s/MPEG4AAC_DECODER//` _libavencoders_all=`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'` _libavencoders=` echo $_libavencoders_all | sed 's/ LIB[A-Z0-9_]*_ENCODER//g'` _libavparsers_all=`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'` @@ -552,6 +553,7 @@ _dga1=auto _dga2=auto _xv=auto _xvmc=no #auto when complete +_vdpau=auto _sdl=auto _direct3d=auto _directx=auto @@ -880,6 +882,8 @@ for ac_option do --disable-xv) _xv=no ;; --enable-xvmc) _xvmc=yes ;; --disable-xvmc) _xvmc=no ;; + --enable-vdpau) _vdpau=yes ;; + --disable-vdpau) _vdpau=no ;; --enable-sdl) _sdl=yes ;; --disable-sdl) _sdl=no ;; --enable-direct3d) _direct3d=yes ;; @@ -1700,7 +1704,7 @@ fi def_fast_64bit='#define HAVE_FAST_64BIT 0' -_arch_all='X86 X86_32 X86_64 IA64 SPARC ARM SH4 PPC ALPHA SGI_MIPS PA_RISC S390 S390X VAX BFIN XTENSA GENERIC' +_arch_all='X86 X86_32 X86_64 IA64 SPARC ARM AVR32 SH4 PPC ALPHA SGI_MIPS PA_RISC S390 S390X VAX BFIN XTENSA GENERIC' case "$host_arch" in i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686) _arch='X86 X86_32' @@ -2059,6 +2063,13 @@ EOF iproc='arm' ;; + avr32) + _arch='AVR32' + _target_arch='ARCH_AVR32 = yes' + def_fast_unaligned='#define HAVE_FAST_UNALIGNED 1' + iproc='avr32' + ;; + sh|sh4) _arch='SH4' _target_arch='ARCH_SH4 = yes' @@ -3145,10 +3156,10 @@ cc_check && _malloc=yes if test "$_malloc" = yes ; then def_malloc_h='#define HAVE_MALLOC_H 1' else - def_malloc_h='#undef HAVE_MALLOC_H' + def_malloc_h='#define HAVE_MALLOC_H 0' fi # malloc.h emits a warning in FreeBSD and OpenBSD -freebsd || openbsd || dragonfly && def_malloc_h='#undef HAVE_MALLOC_H' +freebsd || openbsd || dragonfly && def_malloc_h='#define HAVE_MALLOC_H 0' echores "$_malloc" @@ -3164,7 +3175,7 @@ cc_check && _memalign=yes if test "$_memalign" = yes ; then def_memalign='#define HAVE_MEMALIGN 1' else - def_memalign='#undef HAVE_MEMALIGN' + def_memalign='#define HAVE_MEMALIGN 0' def_map_memalign='#define memalign(a,b) malloc(b)' darwin || def_memalign_hack='#define CONFIG_MEMALIGN_HACK 1' fi @@ -4179,7 +4190,7 @@ else _novomodules="x11 $_novomodules" _res_comment="check if the dev(el) packages are installed" # disable stuff that depends on X - _xv=no ; _xvmc=no ; _xinerama=no ; _vm=no ; _xf86keysym=no + _xv=no ; _xvmc=no ; _xinerama=no ; _vm=no ; _xf86keysym=no ; _vdpau=no fi echores "$_x11" @@ -4290,6 +4301,28 @@ fi echores "$_xvmc" +echocheck "VDPAU" +if test "$_vdpau" = auto ; then + _vdpau=no + if test "$_dl" = yes ; then + cat > $TMPC <<EOF +#include <vdpau/vdpau_x11.h> +int main(void) {return 0;} +EOF + cc_check && _vdpau=yes + fi +fi +if test "$_vdpau" = yes ; then + def_vdpau='#define CONFIG_VDPAU 1' + _vomodules="vdpau $_vomodules" +else + def_vdpau='#define CONFIG_VDPAU 0' + _novomodules="vdpau $_novomodules" + _libavdecoders=`echo $_libavdecoders | sed -e s/MPEG_VDPAU_DECODER// -e s/MPEG1_VDPAU_DECODER// -e s/H264_VDPAU_DECODER// -e s/WMV3_VDPAU_DECODER// -e s/VC1_VDPAU_DECODER//` +fi +echores "$_vdpau" + + echocheck "Xinerama" if test "$_xinerama" = auto ; then cat > $TMPC <<EOF @@ -8161,6 +8194,7 @@ TWOLAME=$_twolame UNRAR_EXEC = $_unrar_exec V4L2 = $_v4l2 VCD = $_vcd +VDPAU = $_vdpau VESA = $_vesa VIDIX = $_vidix VIDIX_PCIDB = $_vidix_pcidb_val @@ -8246,6 +8280,7 @@ CONFIG_MUXERS=$_mencoder CONFIG_POSTPROC = yes # Prevent building libavcodec/imgresample.c with conflicting symbols CONFIG_SWSCALE=yes +CONFIG_VDPAU=$_vdpau CONFIG_XVMC=$_xvmc CONFIG_ZLIB=$_zlib @@ -8606,6 +8641,7 @@ $def_tdfxfb $def_tdfxvid $def_tga $def_v4l2 +$def_vdpau $def_vesa $def_vidix $def_vidix_drv_cyberblade @@ -8701,6 +8737,8 @@ $def_yasm #define HAVE_EBX_AVAILABLE 1 #ifndef MP_DEBUG #define HAVE_EBP_AVAILABLE 1 +#else +#define HAVE_EBP_AVAILABLE 0 #endif /* External libraries used through libavcodec. */ diff --git a/cpudetect.c b/cpudetect.c index 3dd3329d7e..8d306b1c3b 100644 --- a/cpudetect.c +++ b/cpudetect.c @@ -4,7 +4,7 @@ CpuCaps gCpuCaps; -#ifdef HAVE_MALLOC_H +#if HAVE_MALLOC_H #include <malloc.h> #endif #include <stdlib.h> @@ -77,7 +77,7 @@ rdtsc(void) static const char* brandname(int i) { - const static char* brandmap[] = { + static const char* brandmap[] = { NULL, "Intel(R) Celeron(R) processor", "Intel(R) Pentium(R) III processor", @@ -105,7 +105,7 @@ store32(char *d, unsigned int v) int -main(int argc, char **argv) +main(void) { cpuid_regs_t regs, regs_ext; char idstr[13]; diff --git a/drivers/3dfx.h b/drivers/3dfx.h index 99d6ef0a75..123541c865 100644 --- a/drivers/3dfx.h +++ b/drivers/3dfx.h @@ -66,7 +66,7 @@ struct voodoo_2d_reg_t { uint32_t lineStipple; uint32_t lineStyle; uint32_t pattern0Alias; - uint32_t pattern1Alias;; + uint32_t pattern1Alias; uint32_t clip1Min; uint32_t clip1Max; uint32_t srcFormat; diff --git a/etc/codecs.conf b/etc/codecs.conf index 44e78f958f..8c2d4a6506 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -1629,7 +1629,7 @@ videocodec rv3040win videocodec rv40 info "Linux RealPlayer 9 RV40" - status working + status buggy fourcc RV40,rv40 driver realvid dll "drv4.so.6.0" @@ -1653,7 +1653,7 @@ videocodec rv40mac videocodec rv30 info "Linux RealPlayer 8 RV30" - status working + status buggy fourcc RV30,rv30 driver realvid dll "drv3.so.6.0" @@ -1702,7 +1702,7 @@ videocodec ffrv40 videocodec rv20 info "Linux RealPlayer 8 RV20" - status working + status buggy fourcc RV20,rv20 driver realvid dll "drv2.so.6.0" diff --git a/help/help_mp-hu.h b/help/help_mp-hu.h index a3e7d02e4f..bcea3f21cf 100644 --- a/help/help_mp-hu.h +++ b/help/help_mp-hu.h @@ -40,10 +40,10 @@ static char help_text[]= " < vagy > 1 fájllal előre/hátra lépés a lejátszási listában\n" " p vagy SPACE pillanatállj (bármely billentyűre továbbmegy)\n" " q vagy ESC lejátszás vége és kilépés\n" -" + vagy - audio késleltetése ą 0.1 másodperccel\n" +" + vagy - audio késleltetése ± 0.1 másodperccel\n" " o OSD-mód váltása: nincs / keresősáv / keresősáv + idő\n" " * vagy / hangerő fel/le\n" -" x vagy z felirat késleltetése ą 0.1 másodperccel\n" +" x vagy z felirat késleltetése ± 0.1 másodperccel\n" " r vagy t felirat pozíciójának megváltoztatása, lásd -vf expand-ot is\n" "\n" " * * * A MANPAGE TOVÁBBI RÉSZLETEKET, OPCIÓKAT, BILLENTYŰKET TARTALMAZ! * * *\n" diff --git a/liba52/liba52_changes.diff b/liba52/liba52_changes.diff index 9a559a5036..0e9e71c53f 100644 --- a/liba52/liba52_changes.diff +++ b/liba52/liba52_changes.diff @@ -2354,7 +2354,8 @@ +#include "mm_accel.h" +#include "libavutil/avutil.h" - #ifdef HAVE_MEMALIGN +-#ifdef HAVE_MEMALIGN ++#if HAVE_MEMALIGN /* some systems have memalign() but no declaration for it */ void * memalign (size_t align, size_t size); -#else diff --git a/liba52/parse.c b/liba52/parse.c index 92d38b482f..fff01aed5b 100644 --- a/liba52/parse.c +++ b/liba52/parse.c @@ -39,7 +39,7 @@ #include "mm_accel.h" #include "libavutil/avutil.h" -#ifdef HAVE_MEMALIGN +#if HAVE_MEMALIGN /* some systems have memalign() but no declaration for it */ void * memalign (size_t align, size_t size); #endif diff --git a/libaf/af.c b/libaf/af.c index 77fda8e320..7333896882 100644 --- a/libaf/af.c +++ b/libaf/af.c @@ -20,7 +20,7 @@ #include <stdlib.h> #include <string.h> -#ifdef HAVE_MALLOC_H +#if HAVE_MALLOC_H #include <malloc.h> #endif diff --git a/libao2/ao_oss.c b/libao2/ao_oss.c index 44f0c7d857..a98d5d1922 100644 --- a/libao2/ao_oss.c +++ b/libao2/ao_oss.c @@ -454,6 +454,8 @@ static void reset(void){ #endif oss_format = format2oss(ao_data.format); + if(ao_data.format == AF_FORMAT_AC3) + ioctl (audio_fd, SNDCTL_DSP_SPEED, &ao_data.samplerate); ioctl (audio_fd, SNDCTL_DSP_SETFMT, &oss_format); if(ao_data.format != AF_FORMAT_AC3) { if (ao_data.channels > 2) @@ -479,7 +481,7 @@ static void audio_resume(void) int fillcnt; reset(); fillcnt = get_space() - prepause_space; - if (fillcnt > 0) { + if (fillcnt > 0 && !(ao_data.format & AF_FORMAT_SPECIAL_MASK)) { void *silence = calloc(fillcnt, 1); play(silence, fillcnt, 0); free(silence); diff --git a/libfaad2/common.h b/libfaad2/common.h index 29a30d089e..576e9ca115 100644 --- a/libfaad2/common.h +++ b/libfaad2/common.h @@ -69,7 +69,7 @@ extern "C" { /* Use if target platform has address generators with autoincrement */ //#define PREFER_POINTERS -#if defined(_WIN32_WCE) || defined(__arm__) +#if defined(_WIN32_WCE) || defined(__arm__) || defined(__avr32__) #define FIXED_POINT #endif diff --git a/libfaad2/local_changes.diff b/libfaad2/local_changes.diff index a6400eb0b8..0e3fe95d41 100644 --- a/libfaad2/local_changes.diff +++ b/libfaad2/local_changes.diff @@ -52,7 +52,7 @@ //#define PREFER_POINTERS -#ifdef _WIN32_WCE -+#if defined(_WIN32_WCE) || defined(__arm__) ++#if defined(_WIN32_WCE) || defined(__arm__) || defined(__avr32__) #define FIXED_POINT #endif diff --git a/libmenu/vf_menu.c b/libmenu/vf_menu.c index f5ae5ea70d..5112586e48 100644 --- a/libmenu/vf_menu.c +++ b/libmenu/vf_menu.c @@ -24,7 +24,7 @@ #include <stdlib.h> #include <string.h> -#ifdef HAVE_MALLOC_H +#if HAVE_MALLOC_H #include <malloc.h> #endif diff --git a/libmpcodecs/dec_audio.c b/libmpcodecs/dec_audio.c index 947b47bbfc..79073d03e3 100644 --- a/libmpcodecs/dec_audio.c +++ b/libmpcodecs/dec_audio.c @@ -19,7 +19,7 @@ #include "libaf/af.h" -#ifdef HAVE_MALLOC_H +#if HAVE_MALLOC_H #include <malloc.h> #endif diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c index 49ee002bf4..7faf2ac396 100644 --- a/libmpcodecs/dec_video.c +++ b/libmpcodecs/dec_video.c @@ -2,7 +2,7 @@ #include "options.h" #include <stdio.h> -#ifdef HAVE_MALLOC_H +#if HAVE_MALLOC_H #include <malloc.h> #endif #include <stdlib.h> diff --git a/libmpcodecs/mp_image.c b/libmpcodecs/mp_image.c index 809acce221..fd1b3c3997 100644 --- a/libmpcodecs/mp_image.c +++ b/libmpcodecs/mp_image.c @@ -5,7 +5,7 @@ #include <stdlib.h> #include <string.h> -#ifdef HAVE_MALLOC_H +#if HAVE_MALLOC_H #include <malloc.h> #endif diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c index 86b9f0c511..22bdddc909 100644 --- a/libmpcodecs/vd.c +++ b/libmpcodecs/vd.c @@ -336,7 +336,8 @@ mp_image_t *mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, mp_image_t *mpi = vf_get_image(sh->vfilter, sh->codec->outfmt[sh->outfmtidx], mp_imgtype, mp_imgflag, w, h); - mpi->x = mpi->y = 0; + if (mpi) + mpi->x = mpi->y = 0; return mpi; } diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 9e3aae2d08..c70da3a9f3 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -215,15 +215,24 @@ static int init(sh_video_t *sh){ if(lavc_codec->capabilities&CODEC_CAP_DR1 && !do_vis_debug && lavc_codec->id != CODEC_ID_H264 && lavc_codec->id != CODEC_ID_INTERPLAY_VIDEO && lavc_codec->id != CODEC_ID_ROQ) ctx->do_dr1=1; + if (lavc_codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) + ctx->do_dr1=1; ctx->b_age= ctx->ip_age[0]= ctx->ip_age[1]= 256*256*256*64; ctx->ip_count= ctx->b_count= 0; ctx->pic = avcodec_alloc_frame(); ctx->avctx = avcodec_alloc_context(); avctx = ctx->avctx; + avctx->opaque = sh; +#if CONFIG_VDPAU + if(lavc_codec->capabilities & CODEC_CAP_HWACCEL_VDPAU){ + avctx->get_format = get_format; + avctx->draw_horiz_band = draw_slice; + avctx->slice_flags = SLICE_FLAG_CODED_ORDER|SLICE_FLAG_ALLOW_FIELD; + } +#endif /* CONFIG_VDPAU */ #if CONFIG_XVMC - if(lavc_codec->capabilities & CODEC_CAP_HWACCEL){ mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_XVMCAcceleratedCodec); assert(ctx->do_dr1);//these are mu |