changeset 29843:f6d56a15f1d8

Support VDPAU hardware accelerated decoding of MPEG-4 ASP on capable hardware. Original patch by NVIDIA corporation.
author cehoyos
date Tue, 10 Nov 2009 19:11:13 +0000
parents 5087d7ad1f5b
children ab281bcfecb9
files DOCS/man/en/mplayer.1 codec-cfg.c etc/codecs.conf fmt-conversion.c libmpcodecs/img_format.c libmpcodecs/img_format.h libswscale/swscale.c libvo/vo_vdpau.c
diffstat 8 files changed, 43 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1	Tue Nov 10 18:10:16 2009 +0000
+++ b/DOCS/man/en/mplayer.1	Tue Nov 10 19:11:13 2009 +0000
@@ -3465,7 +3465,8 @@
 .PD 1
 .
 .TP
-.B vdpau (with \-vc ffmpeg12vdpau, ffwmv3vdpau, ffvc1vdpau or ffh264vdpau)
+.B vdpau (with \-vc ffmpeg12vdpau, ffwmv3vdpau, ffvc1vdpau, ffh264vdpau
+or ffodivxvdpau)
 Video output that uses VDPAU to decode video via hardware.
 Also supports displaying of software-decoded video.
 .PD 0
--- a/codec-cfg.c	Tue Nov 10 18:10:16 2009 +0000
+++ b/codec-cfg.c	Tue Nov 10 19:11:13 2009 +0000
@@ -192,6 +192,7 @@
 		{"VDPAU_H264",IMGFMT_VDPAU_H264},
 		{"VDPAU_WMV3",IMGFMT_VDPAU_WMV3},
 		{"VDPAU_VC1",IMGFMT_VDPAU_VC1},
+		{"VDPAU_MPEG4",IMGFMT_VDPAU_MPEG4},
 
 		{NULL,    0}
 	};
--- a/etc/codecs.conf	Tue Nov 10 18:10:16 2009 +0000
+++ b/etc/codecs.conf	Tue Nov 10 19:11:13 2009 +0000
@@ -954,6 +954,37 @@
   dll mpeg4 ;opendivx
   out YV12,I420,IYUV
 
+videocodec ffodivxvdpau
+  info "FFmpeg MPEG-4,DIVX-4/5 (VDPAU)"
+  status working
+  fourcc FMP4,fmp4
+  fourcc DIVX,divx
+  fourcc DIV1,div1 divx
+  fourcc MP4S,mp4s ; ISO MPEG-4 Video V1
+  fourcc M4S2,m4s2
+  fourcc xvid,XVID,XviD,XVIX
+  fourcc DX50,dx50,BLZ0 DX50
+  fourcc mp4v,MP4V
+  format 0x4
+  fourcc UMP4
+  fourcc RMP4
+  fourcc 3IV2,3iv2  ; 3ivx Delta 4
+  fourcc DXGM
+  fourcc SEDG ; diskless camcorder Samsung Miniket VP-M110
+  fourcc SMP4,smp4 ; Samsung SMP4 video codec
+  fourcc VIDM ; vidm 4.01 codec
+  format 0x10000004  ; mpeg 4 es
+  fourcc m4cc,M4CC
+  fourcc hdx4,HDX4
+  fourcc FVFW,fvfw
+  fourcc FFDS
+  fourcc DCOD,MVXM,EM4A,PM4V
+  fourcc M4T3,DMK2,DIGI,INMC
+  fourcc EPHV,SN40
+  driver ffmpeg
+  dll mpeg4_vdpau
+  out VDPAU_MPEG4
+
 videocodec ffwv1f
   info "WV1F MPEG-4"
   status working
--- a/fmt-conversion.c	Tue Nov 10 18:10:16 2009 +0000
+++ b/fmt-conversion.c	Tue Nov 10 19:11:13 2009 +0000
@@ -73,6 +73,7 @@
     {IMGFMT_VDPAU_H264,      PIX_FMT_VDPAU_H264},
     {IMGFMT_VDPAU_WMV3,      PIX_FMT_VDPAU_WMV3},
     {IMGFMT_VDPAU_VC1,       PIX_FMT_VDPAU_VC1},
+    {IMGFMT_VDPAU_MPEG4,     PIX_FMT_VDPAU_MPEG4},
     {0, PIX_FMT_NONE}
 };
 
--- a/libmpcodecs/img_format.c	Tue Nov 10 18:10:16 2009 +0000
+++ b/libmpcodecs/img_format.c	Tue Nov 10 19:11:13 2009 +0000
@@ -72,6 +72,7 @@
 	case IMGFMT_VDPAU_MPEG1: return "MPEG1 VDPAU acceleration";
 	case IMGFMT_VDPAU_MPEG2: return "MPEG2 VDPAU acceleration";
 	case IMGFMT_VDPAU_H264: return "H.264 VDPAU acceleration";
+	case IMGFMT_VDPAU_MPEG4: return "MPEG-4 Part 2 VDPAU acceleration";
 	case IMGFMT_VDPAU_WMV3: return "WMV3 VDPAU acceleration";
 	case IMGFMT_VDPAU_VC1: return "VC1 VDPAU acceleration";
     }
--- a/libmpcodecs/img_format.h	Tue Nov 10 18:10:16 2009 +0000
+++ b/libmpcodecs/img_format.h	Tue Nov 10 19:11:13 2009 +0000
@@ -120,6 +120,7 @@
 #define IMGFMT_VDPAU_H264          (IMGFMT_VDPAU|0x03)
 #define IMGFMT_VDPAU_WMV3          (IMGFMT_VDPAU|0x04)
 #define IMGFMT_VDPAU_VC1           (IMGFMT_VDPAU|0x05)
+#define IMGFMT_VDPAU_MPEG4         (IMGFMT_VDPAU|0x06)
 
 typedef struct {
     void* data;
--- a/libswscale/swscale.c	Tue Nov 10 18:10:16 2009 +0000
+++ b/libswscale/swscale.c	Tue Nov 10 19:11:13 2009 +0000
@@ -459,6 +459,8 @@
         return "vdpau_wmv3";
     case PIX_FMT_VDPAU_VC1:
         return "vdpau_vc1";
+    case PIX_FMT_VDPAU_MPEG4:
+        return "vdpau_mpeg4";
     case PIX_FMT_YUV420P16LE:
         return "yuv420p16le";
     case PIX_FMT_YUV422P16LE:
--- a/libvo/vo_vdpau.c	Tue Nov 10 18:10:16 2009 +0000
+++ b/libvo/vo_vdpau.c	Tue Nov 10 19:11:13 2009 +0000
@@ -579,6 +579,9 @@
     case IMGFMT_VDPAU_VC1:
         vdp_decoder_profile = VDP_DECODER_PROFILE_VC1_ADVANCED;
         break;
+    case IMGFMT_VDPAU_MPEG4:
+        vdp_decoder_profile = VDP_DECODER_PROFILE_MPEG4_PART2_ASP;
+        break;
     default:
         goto err_out;
     }
@@ -1112,6 +1115,7 @@
     case IMGFMT_VDPAU_H264:
     case IMGFMT_VDPAU_WMV3:
     case IMGFMT_VDPAU_VC1:
+    case IMGFMT_VDPAU_MPEG4:
         if (create_vdp_decoder(format, 48, 48, 2))
             return default_flags;
     }