diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-02-14 08:29:45 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-02-14 08:29:45 +0000 |
commit | 8c1978cc265ececda2a30ea40bea0de52f4fc1d1 (patch) | |
tree | 6c47ba8ea6ced7cdc8c99e90e6a908b4ffc3e790 | |
parent | f78c49e030f3cfbf12e8ae73fcae6d804dfd7e04 (diff) | |
download | mpv-8c1978cc265ececda2a30ea40bea0de52f4fc1d1.tar.bz2 mpv-8c1978cc265ececda2a30ea40bea0de52f4fc1d1.tar.xz |
Add support for image formats and codecs used by VDPAU
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28551 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | codec-cfg.c | 6 | ||||
-rw-r--r-- | etc/codecs.conf | 55 | ||||
-rw-r--r-- | libmpcodecs/img_format.c | 5 | ||||
-rw-r--r-- | libmpcodecs/img_format.h | 10 | ||||
-rw-r--r-- | libmpcodecs/mp_image.h | 4 |
5 files changed, 80 insertions, 0 deletions
diff --git a/codec-cfg.c b/codec-cfg.c index 221c88dd18..bb09f109fd 100644 --- a/codec-cfg.c +++ b/codec-cfg.c @@ -182,6 +182,12 @@ static int add_to_format(char *s, char *alias,unsigned int *fourcc, unsigned int {"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} }; diff --git a/etc/codecs.conf b/etc/codecs.conf index 8c584979f8..a269adb9d5 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -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 diff --git a/libmpcodecs/img_format.c b/libmpcodecs/img_format.c index 30df2391f4..789e473f84 100644 --- a/libmpcodecs/img_format.c +++ b/libmpcodecs/img_format.c @@ -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; diff --git a/libmpcodecs/img_format.h b/libmpcodecs/img_format.h index c15269b580..3922fdc5f3 100644 --- a/libmpcodecs/img_format.h +++ b/libmpcodecs/img_format.h @@ -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; diff --git a/libmpcodecs/mp_image.h b/libmpcodecs/mp_image.h index ad92421787..94fd0d4758 100644 --- a/libmpcodecs/mp_image.h +++ b/libmpcodecs/mp_image.h @@ -118,6 +118,10 @@ static inline void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){ mpi->bpp=0; return; } + if(IMGFMT_IS_VDPAU(out_fmt)){ + mpi->bpp=0; + return; + } if(IMGFMT_IS_XVMC(out_fmt)){ mpi->bpp=0; return; |