[MPlayer-cvslog] r28551 - in trunk: codec-cfg.c etc/codecs.conf libmpcodecs/img_format.c libmpcodecs/img_format.h libmpcodecs/mp_image.h

reimar subversion at mplayerhq.hu
Sat Feb 14 09:29:45 CET 2009


Author: reimar
Date: Sat Feb 14 09:29:45 2009
New Revision: 28551

Log:
Add support for image formats and codecs used by VDPAU

Modified:
   trunk/codec-cfg.c
   trunk/etc/codecs.conf
   trunk/libmpcodecs/img_format.c
   trunk/libmpcodecs/img_format.h
   trunk/libmpcodecs/mp_image.h

Modified: trunk/codec-cfg.c
==============================================================================
--- trunk/codec-cfg.c	Sat Feb 14 09:22:49 2009	(r28550)
+++ trunk/codec-cfg.c	Sat Feb 14 09:29:45 2009	(r28551)
@@ -182,6 +182,12 @@ static int add_to_format(char *s, char *
 		{"IDCT_MPEG2",IMGFMT_XVMC_IDCT_MPEG2},
 		{"MOCO_MPEG2",IMGFMT_XVMC_MOCO_MPEG2},
 
+		{"VDPAU_MPEG1",IMGFMT_VDPAU_MPEG1},
+		{"VDPAU_MPEG2",IMGFMT_VDPAU_MPEG2},
+		{"VDPAU_H264",IMGFMT_VDPAU_H264},
+		{"VDPAU_WMV3",IMGFMT_VDPAU_WMV3},
+		{"VDPAU_VC1",IMGFMT_VDPAU_VC1},
+
 		{NULL,    0}
 	};
 

Modified: trunk/etc/codecs.conf
==============================================================================
--- trunk/etc/codecs.conf	Sat Feb 14 09:22:49 2009	(r28550)
+++ trunk/etc/codecs.conf	Sat Feb 14 09:29:45 2009	(r28551)
@@ -272,6 +272,33 @@ videocodec ffmpeg12mc
   out IDCT_MPEG2
   out MOCO_MPEG2
 
+videocodec ffmpeg12vdpau
+  info "FFmpeg MPEG-1/2 (VDPAU)"
+  status working
+  format 0x10000001  ; MPEG-1
+  format 0x10000002  ; MPEG-2
+  fourcc mpg1,mpg2,MPG2
+  fourcc "DVR "
+  fourcc hdv1
+  fourcc hdv2
+  fourcc PIM1        ; Pinnacle hardware-MPEG-1
+  fourcc VCR2
+  fourcc MPEG
+  fourcc hdv3        ; HDV 1080i50
+  fourcc hdv5        ; HDV  720p25
+  fourcc mx5p        ; MPEG IMX 625/50 (50 Mb/s)
+  fourcc MMES,mmes   ; matrox mpeg2 in avi
+  fourcc hdv6,hdv7,hdv8
+  fourcc xdv1,xdv2,xdv3
+  fourcc xdv4,xdv5,xdv6
+  fourcc xdv7,xdv8,xdv9
+  fourcc xdva,xdvb,xdvc
+  fourcc xdvd,xdve,xdvf
+  driver ffmpeg
+  dll "mpegvideo_vdpau"
+  out VDPAU_MPEG1
+  out VDPAU_MPEG2
+
 ; we have only native open source codecs for these:
 
 videocodec ffnuv
@@ -771,6 +798,14 @@ videocodec ffwmv3
   dll wmv3
   out YV12,I420,IYUV
 
+videocodec ffwmv3vdpau
+  info "FFmpeg WMV3/WMV9 (VDPAU)"
+  status working
+  fourcc WMV3,wmv3
+  driver ffmpeg
+  dll wmv3_vdpau
+  out VDPAU_WMV3
+
 videocodec ffvc1
   info "FFmpeg WVC1"
   status buggy
@@ -780,6 +815,14 @@ videocodec ffvc1
   dll vc1
   out YV12,I420,IYUV
 
+videocodec ffvc1vdpau
+  info "FFmpeg WVC1 (VDPAU)"
+  status working
+  fourcc WVC1,wvc1
+  driver ffmpeg
+  dll vc1_vdpau
+  out VDPAU_VC1
+
 videocodec ffh264
   info "FFmpeg H.264"
   status working
@@ -792,6 +835,18 @@ videocodec ffh264
   dll h264
   out YV12,I420,IYUV
 
+videocodec ffh264vdpau
+  info "FFmpeg H.264 (VDPAU)"
+  status working
+  fourcc H264,h264
+  fourcc X264,x264
+  fourcc avc1,AVC1
+  fourcc davc,DAVC
+  format 0x10000005
+  driver ffmpeg
+  dll h264_vdpau
+  out VDPAU_H264
+
 videocodec ffsvq3
   info "FFmpeg Sorenson Video v3 (SVQ3)"
   status working

Modified: trunk/libmpcodecs/img_format.c
==============================================================================
--- trunk/libmpcodecs/img_format.c	Sat Feb 14 09:22:49 2009	(r28550)
+++ trunk/libmpcodecs/img_format.c	Sat Feb 14 09:29:45 2009	(r28551)
@@ -67,6 +67,11 @@ const char *vo_format_name(int format)
 	case IMGFMT_ZRMJPEGIB: return "Zoran MJPEG bottom field first";
 	case IMGFMT_XVMC_MOCO_MPEG2: return "MPEG1/2 Motion Compensation";
 	case IMGFMT_XVMC_IDCT_MPEG2: return "MPEG1/2 Motion Compensation and IDCT";
+	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_WMV3: return "WMV3 VDPAU acceleration";
+	case IMGFMT_VDPAU_VC1: return "VC1 VDPAU acceleration";
     }
     snprintf(unknown_format,20,"Unknown 0x%04x",format);
     return unknown_format;

Modified: trunk/libmpcodecs/img_format.h
==============================================================================
--- trunk/libmpcodecs/img_format.h	Sat Feb 14 09:22:49 2009	(r28550)
+++ trunk/libmpcodecs/img_format.h	Sat Feb 14 09:29:45 2009	(r28551)
@@ -107,6 +107,16 @@
 #define IMGFMT_XVMC_MOCO_MPEG2 (IMGFMT_XVMC|0x02)
 #define IMGFMT_XVMC_IDCT_MPEG2 (IMGFMT_XVMC|0x82)
 
+// VDPAU specific format.
+#define IMGFMT_VDPAU               0x1DC80000
+#define IMGFMT_VDPAU_MASK          0xFFFF0000
+#define IMGFMT_IS_VDPAU(fmt)       (((fmt)&IMGFMT_VDPAU_MASK)==IMGFMT_VDPAU)
+#define IMGFMT_VDPAU_MPEG1         (IMGFMT_VDPAU|0x01)
+#define IMGFMT_VDPAU_MPEG2         (IMGFMT_VDPAU|0x02)
+#define IMGFMT_VDPAU_H264          (IMGFMT_VDPAU|0x03)
+#define IMGFMT_VDPAU_WMV3          (IMGFMT_VDPAU|0x04)
+#define IMGFMT_VDPAU_VC1           (IMGFMT_VDPAU|0x05)
+
 typedef struct {
     void* data;
     int size;

Modified: trunk/libmpcodecs/mp_image.h
==============================================================================
--- trunk/libmpcodecs/mp_image.h	Sat Feb 14 09:22:49 2009	(r28550)
+++ trunk/libmpcodecs/mp_image.h	Sat Feb 14 09:29:45 2009	(r28551)
@@ -118,6 +118,10 @@ static inline void mp_image_setfmt(mp_im
 	mpi->bpp=0;
 	return;
     }
+    if(IMGFMT_IS_VDPAU(out_fmt)){
+        mpi->bpp=0;
+        return;
+    }
     if(IMGFMT_IS_XVMC(out_fmt)){
 	mpi->bpp=0;
 	return;



More information about the MPlayer-cvslog mailing list