# HG changeset patch # User reimar # Date 1234600185 0 # Node ID 79b0bd20433e26650ef1737c8eeff325e59a77da # Parent 134689b7b54889e3308e92f44cd245edb101fddf Add support for image formats and codecs used by VDPAU diff -r 134689b7b548 -r 79b0bd20433e codec-cfg.c --- a/codec-cfg.c Sat Feb 14 08:22:49 2009 +0000 +++ b/codec-cfg.c Sat Feb 14 08:29:45 2009 +0000 @@ -182,6 +182,12 @@ {"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 -r 134689b7b548 -r 79b0bd20433e etc/codecs.conf --- a/etc/codecs.conf Sat Feb 14 08:22:49 2009 +0000 +++ b/etc/codecs.conf Sat Feb 14 08:29:45 2009 +0000 @@ -272,6 +272,33 @@ 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 @@ 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 @@ 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 @@ 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 -r 134689b7b548 -r 79b0bd20433e libmpcodecs/img_format.c --- a/libmpcodecs/img_format.c Sat Feb 14 08:22:49 2009 +0000 +++ b/libmpcodecs/img_format.c Sat Feb 14 08:29:45 2009 +0000 @@ -67,6 +67,11 @@ 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 -r 134689b7b548 -r 79b0bd20433e libmpcodecs/img_format.h --- a/libmpcodecs/img_format.h Sat Feb 14 08:22:49 2009 +0000 +++ b/libmpcodecs/img_format.h Sat Feb 14 08:29:45 2009 +0000 @@ -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 -r 134689b7b548 -r 79b0bd20433e libmpcodecs/mp_image.h --- a/libmpcodecs/mp_image.h Sat Feb 14 08:22:49 2009 +0000 +++ b/libmpcodecs/mp_image.h Sat Feb 14 08:29:45 2009 +0000 @@ -118,6 +118,10 @@ mpi->bpp=0; return; } + if(IMGFMT_IS_VDPAU(out_fmt)){ + mpi->bpp=0; + return; + } if(IMGFMT_IS_XVMC(out_fmt)){ mpi->bpp=0; return;