summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-11-16 02:45:59 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-11-16 02:46:33 +0200
commitb8861ce8e28080b151467827f65bdc3707a74511 (patch)
tree389371a07fb867d9a37fc130d530df8c2fe2f66f
parent19b4d70e01ca2fd963b4ca599e0377e109a6881f (diff)
downloadmpv-b8861ce8e28080b151467827f65bdc3707a74511.tar.bz2
mpv-b8861ce8e28080b151467827f65bdc3707a74511.tar.xz
Support VDPAU MPEG4 hardware decoding
Original patch by NVIDIA.
-rw-r--r--DOCS/man/en/mplayer.13
-rw-r--r--codec-cfg.c1
-rw-r--r--etc/codecs.conf31
-rw-r--r--fmt-conversion.c1
-rw-r--r--libmpcodecs/img_format.c1
-rw-r--r--libmpcodecs/img_format.h1
-rw-r--r--libvo/vo_vdpau.c6
7 files changed, 43 insertions, 1 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index 2a760944fc..50757d6bbe 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -3410,7 +3410,8 @@ 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)
+.B vdpau (with \-vc ffmpeg12vdpau, ffwmv3vdpau, ffvc1vdpau or ffh264vdpau or
+ffodivxvdpau)
Video output that uses VDPAU to decode video via hardware.
Also supports displaying of software-decoded video.
.PD 0
diff --git a/codec-cfg.c b/codec-cfg.c
index 6e90c06fa8..27e07c92ac 100644
--- a/codec-cfg.c
+++ b/codec-cfg.c
@@ -195,6 +195,7 @@ static int add_to_format(char *s, char *alias,unsigned int *fourcc, unsigned int
{"VDPAU_H264",IMGFMT_VDPAU_H264},
{"VDPAU_WMV3",IMGFMT_VDPAU_WMV3},
{"VDPAU_VC1",IMGFMT_VDPAU_VC1},
+ {"VDPAU_MPEG4",IMGFMT_VDPAU_MPEG4},
{NULL, 0}
};
diff --git a/etc/codecs.conf b/etc/codecs.conf
index 84660fc82f..68d47e6dea 100644
--- a/etc/codecs.conf
+++ b/etc/codecs.conf
@@ -954,6 +954,37 @@ videocodec ffodivx
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
diff --git a/fmt-conversion.c b/fmt-conversion.c
index 05179d1b29..06699c6ee5 100644
--- a/fmt-conversion.c
+++ b/fmt-conversion.c
@@ -73,6 +73,7 @@ static const struct {
{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}
};
diff --git a/libmpcodecs/img_format.c b/libmpcodecs/img_format.c
index 4704cf2f6a..7d20a77cc7 100644
--- a/libmpcodecs/img_format.c
+++ b/libmpcodecs/img_format.c
@@ -72,6 +72,7 @@ const char *vo_format_name(int format)
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";
}
diff --git a/libmpcodecs/img_format.h b/libmpcodecs/img_format.h
index 89efb1d6cb..752629175d 100644
--- a/libmpcodecs/img_format.h
+++ b/libmpcodecs/img_format.h
@@ -118,6 +118,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;
diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c
index 2bd0eec3c4..484b5fc87d 100644
--- a/libvo/vo_vdpau.c
+++ b/libvo/vo_vdpau.c
@@ -721,6 +721,11 @@ static int create_vdp_decoder(struct vo *vo, int max_refs)
case IMGFMT_VDPAU_VC1:
vdp_decoder_profile = VDP_DECODER_PROFILE_VC1_ADVANCED;
break;
+#ifdef VDP_DECODER_PROFILE_MPEG4_PART2_ASP
+ case IMGFMT_VDPAU_MPEG4:
+ vdp_decoder_profile = VDP_DECODER_PROFILE_MPEG4_PART2_ASP;
+ break;
+#endif
}
vdp_st = vdp->decoder_create(vc->vdp_device, vdp_decoder_profile,
vc->vid_width, vc->vid_height, max_refs,
@@ -1508,6 +1513,7 @@ static int query_format(uint32_t format)
case IMGFMT_VDPAU_H264:
case IMGFMT_VDPAU_WMV3:
case IMGFMT_VDPAU_VC1:
+ case IMGFMT_VDPAU_MPEG4:
return default_flags;
}
return 0;