Skip to content

Commit

Permalink
vo_xvmc: drop XvMC support
Browse files Browse the repository at this point in the history
Due to libavcodec changes vo_xvmc would have needed some modifications
to keep working. However, I think there's little real demand for XvMC,
so I'll just drop XvMC support. XvMC only supported MPEG-2, making it
of very limited usefulness nowadays, plus the vo_xvmc implementation
was not high quality and never worked particularly well or reliably
anyway.
  • Loading branch information
Uoti Urpala committed May 9, 2011
1 parent b21e7dc commit cbdb7e6
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 1,481 deletions.
46 changes: 6 additions & 40 deletions DOCS/man/en/mplayer.1
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ Show filename on the OSD.
Show progression bar, elapsed time and total duration on the OSD.
.IPs "! and @"
Seek to the beginning of the previous/next chapter.
.IPs "D (\-vo xvmc, \-vo vdpau, \-vf yadif, \-vf kerndeint only)"
.IPs "D (\-vo vdpau, \-vf yadif, \-vf kerndeint only)"
Activate/deactivate deinterlacer.
.IPs "A\ \ \ \ "
Cycle through the available DVD angles.
Expand Down Expand Up @@ -748,15 +748,13 @@ chapter change instead of doing a seek.
Changes the colorkey to an RGB value of your choice.
0x000000 is black and 0xffffff is white.
Only supported by the fbdev, svga, vesa, xmga,
xover, xv (see \-vo xv:ck), xvmc (see \-vo xv:ck) and directx video output
drivers.
xover, xv (see \-vo xv:ck) and directx video output drivers.
.
.TP
.B \-nocolorkey
Disables colorkeying.
Only supported by the fbdev, svga, vesa, xmga,
xover, xv (see \-vo xv:ck), xvmc (see \-vo xv:ck) and directx video output
drivers.
xover, xv (see \-vo xv:ck) and directx video output drivers.
.
.TP
.B \-correct\-pts, \-nocorrect\-pts
Expand Down Expand Up @@ -978,7 +976,7 @@ Display the main menu at MPlayer startup.
Permit MPlayer to receive pointer events reported by the video
output driver.
Necessary to select the buttons in DVD menus.
Supported for X11-based VOs (x11, xv, xvmc, etc) and the gl, gl2, direct3d and
Supported for X11-based VOs (x11, xv, etc) and the gl, gl2, direct3d and
corevideo VOs.
.
.TP
Expand Down Expand Up @@ -3171,7 +3169,7 @@ y coordinates are relative to the top-left corner of the window rather
than the screen.
The coordinates are relative to the screen given with \-xineramascreen for
the video output drivers that fully support \-xineramascreen (direct3d, gl, gl2,
vdpau, x11, xv, xvmc, corevideo).
vdpau, x11, xv, corevideo).
.br
.I NOTE:
May not be supported by some of the older VO drivers.
Expand Down Expand Up @@ -3558,38 +3556,6 @@ surfaces that work well or at all.
.PD 1
.
.TP
.B xvmc (X11 with \-vc ffmpeg12mc only)
Video output driver that uses the XvMC (X Video Motion Compensation)
extension of XFree86 4.x to speed up MPEG-1/2 and VCR2 decoding.
.PD 0
.RSs
.IPs adaptor=<number>
Select a specific XVideo adaptor (check xvinfo results).
.IPs port=<number>
Select a specific XVideo port.
.IPs (no)benchmark
Disables image display.
Necessary for proper benchmarking of drivers that change
image buffers on monitor retrace only (nVidia).
Default is not to disable image display (nobenchmark).
.IPs (no)bobdeint
Very simple deinterlacer.
Might not look better than \-vf tfields=1,
but it is the only deinterlacer for xvmc (default: nobobdeint).
.IPs (no)queue
Queue frames for display to allow more parallel work of the video hardware.
May add a small (not noticeable) constant A/V desync (default: noqueue).
.IPs (no)sleep
Use sleep function while waiting for rendering to finish
(not recommended on Linux) (default: nosleep).
.IPs ck=cur|use|set
Same as \-vo xv:ck (see \-vo xv).
.IPs ck-method=man|bg|auto
Same as \-vo xv:ck-method (see \-vo xv).
.RE
.PD 1
.
.TP
.B dga (X11 only)
Play video through the XFree86 Direct Graphics Access extension.
Considered obsolete.
Expand Down Expand Up @@ -4516,7 +4482,7 @@ Disable automatic movie aspect ratio compensation.
.B "\-field\-dominance <\-1\-1>"
Set first field for interlaced content.
Useful for deinterlacers that double the framerate: \-vf tfields=1,
\-vf yadif=1, \-vo vdpau:deint and \-vo xvmc:bobdeint.
\-vf yadif=1 and \-vo vdpau:deint.
.PD 0
.RSs
.IPs \-1
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,6 @@ SRCS_MPLAYER-$(X11) += libvo/vo_x11.c libvo/vo_xover.c \
libvo/x11_common.c
SRCS_MPLAYER-$(XMGA) += libvo/vo_xmga.c
SRCS_MPLAYER-$(XV) += libvo/vo_xv.c
SRCS_MPLAYER-$(XVMC) += libvo/vo_xvmc.c
SRCS_MPLAYER-$(XVR100) += libvo/vo_xvr100.c
SRCS_MPLAYER-$(YUV4MPEG) += libvo/vo_yuv4mpeg.c

Expand Down
41 changes: 1 addition & 40 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,6 @@ Video output:
--enable-mga enable mga_vid video output [autodetect]
--enable-xmga enable mga_vid X11 video output [autodetect]
--enable-xv enable Xv video output [autodetect]
--enable-xvmc enable XvMC acceleration [disable]
--enable-vdpau enable VDPAU acceleration [autodetect]
--enable-vm enable XF86VidMode support [autodetect]
--enable-xinerama enable Xinerama support [autodetect]
Expand Down Expand Up @@ -503,7 +502,6 @@ Use these options if autodetection fails:
--extra-ldflags=FLAGS extra LDFLAGS
--extra-libs=FLAGS extra linker flags
--extra-libs-mplayer=FLAGS extra linker flags for MPlayer
--with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
--with-freetype-config=PATH path to freetype-config
--with-sdl-config=PATH path to sdl*-config
Expand Down Expand Up @@ -560,7 +558,6 @@ _xss=auto
_dga1=auto
_dga2=auto
_xv=auto
_xvmc=no #auto when complete
_vdpau=auto
_sdl=auto
_kva=auto
Expand Down Expand Up @@ -745,9 +742,6 @@ for ac_option do
--with-install=*)
_install=$(echo $ac_option | cut -d '=' -f 2 )
;;
--with-xvmclib=*)
_xvmclib=$(echo $ac_option | cut -d '=' -f 2)
;;

--with-sdl-config=*)
_sdlconfig=$(echo $ac_option | cut -d '=' -f 2)
Expand Down Expand Up @@ -857,8 +851,6 @@ for ac_option do
--disable-xss) _xss=no ;;
--enable-xv) _xv=yes ;;
--disable-xv) _xv=no ;;
--enable-xvmc) _xvmc=yes ;;
--disable-xvmc) _xvmc=no ;;
--enable-vdpau) _vdpau=yes ;;
--disable-vdpau) _vdpau=no ;;
--enable-sdl) _sdl=yes ;;
Expand Down Expand Up @@ -3873,7 +3865,7 @@ else
novomodules="x11 $novomodules"
res_comment="check if the dev(el) packages are installed"
# disable stuff that depends on X
_xv=no ; _xvmc=no ; _xinerama=no ; _vm=no ; _xf86keysym=no ; _vdpau=no
_xv=no ; _xinerama=no ; _vm=no ; _xf86keysym=no ; _vdpau=no
fi
echores "$_x11"

Expand Down Expand Up @@ -3937,34 +3929,6 @@ fi
echores "$_xv"


echocheck "XvMC"
if test "$_xv" = yes && test "$_xvmc" != no ; then
_xvmc=no
cat > $TMPC <<EOF
#include <X11/Xlib.h>
#include <X11/extensions/Xvlib.h>
#include <X11/extensions/XvMClib.h>
int main(void) {
XvMCQueryExtension(0, 0, 0);
XvMCCreateContext(0, 0, 0, 0, 0, 0, 0);
return 0; }
EOF
for _ld_tmp in $_xvmclib XvMCNVIDIA XvMCW I810XvMC ; do
cc_check -lXvMC -l$_ld_tmp && _xvmc=yes && _xvmclib="$_ld_tmp" && break
done
fi
if test "$_xvmc" = yes ; then
def_xvmc='#define CONFIG_XVMC 1'
libs_mplayer="$libs_mplayer -lXvMC -l$_xvmclib"
vomodules="xvmc $vomodules"
res_comment="using $_xvmclib"
else
def_xvmc='#define CONFIG_XVMC 0'
novomodules="xvmc $novomodules"
fi
echores "$_xvmc"


echocheck "VDPAU"
if test "$_vdpau" = auto ; then
_vdpau=no
Expand Down Expand Up @@ -6846,7 +6810,6 @@ XMGA = $_xmga
XMMS_PLUGINS = $_xmms
XV = $_xv
XVID4 = $_xvid
XVMC = $_xvmc
XVR100 = $_xvr100
YUV4MPEG = $_yuv4mpeg
Expand All @@ -6861,7 +6824,6 @@ YASM = $_yasm
YASMFLAGS = $YASMFLAGS
CONFIG_VDPAU = $_vdpau
CONFIG_XVMC = $_xvmc
CONFIG_ZLIB = $_zlib
HAVE_PTHREADS = $_pthreads
Expand Down Expand Up @@ -7203,7 +7165,6 @@ $def_xinerama
$def_xmga
$def_xss
$def_xv
$def_xvmc
$def_xvr100
$def_yuv4mpeg
Expand Down
35 changes: 0 additions & 35 deletions etc/codecs.conf
Original file line number Diff line number Diff line change
Expand Up @@ -260,41 +260,6 @@ videocodec ffmpeg12
out YV12,I420,IYUV
out 422P,444P

videocodec ffmpeg12mc
info "FFmpeg MPEG-1/2 (XvMC)"
status buggy
format 0x10000001 ; MPEG-1
format 0x10000002 ; MPEG-2
fourcc mpg1,mpg2,MPG2
fourcc "DVR "
fourcc PIM1 ; Pinnacle hardware-MPEG-1
fourcc PIM2 ; Pinnacle hardware-MPEG-2
fourcc VCR2
fourcc MPEG
fourcc mx5p ; MPEG IMX 625/50 (50 Mb/s)
fourcc MMES,mmes ; matrox mpeg2 in avi
fourcc hdv1,hdv2,hdv3
fourcc hdv4,hdv5,hdv6
fourcc hdv7,hdv8,hdv9
fourcc xdv1,xdv2,xdv3
fourcc xdv4,xdv5,xdv6
fourcc xdv7,xdv8,xdv9
fourcc xdva,xdvb,xdvc
fourcc xdvd,xdve,xdvf
fourcc xd5a,xd5b,xd5c
fourcc xd5d,xd5e,xd5f
fourcc xd59,xd54,xd55
fourcc mx5n,mx4n,mx4p
fourcc mx3n,mx3p
fourcc AVmp
fourcc mp2v,mpgv
fourcc m2v1,m1v1
fourcc LMP2 ; Lead mpeg2 in avi
driver ffmpeg
dll "mpegvideo_xvmc"
out IDCT_MPEG2
out MOCO_MPEG2

videocodec ffmpeg12vdpau
info "FFmpeg MPEG-1/2 (VDPAU)"
status working
Expand Down
41 changes: 0 additions & 41 deletions libmpcodecs/vd_ffmpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ static const vd_info_t info = {
#error palette too large, adapt libmpcodecs/vf.c:vf_get_image
#endif

#if CONFIG_XVMC
#include "libavcodec/xvmc.h"
#endif

int avcodec_initialized=0;

typedef struct {
Expand Down Expand Up @@ -142,11 +138,6 @@ static int control(sh_video_t *sh, int cmd, void *arg, ...){
if(ctx->best_csp == IMGFMT_YV12) return CONTROL_TRUE;// u/v swap
if(ctx->best_csp == IMGFMT_422P && !ctx->do_dr1) return CONTROL_TRUE;// half stride
break;
#if CONFIG_XVMC
case IMGFMT_XVMC_IDCT_MPEG2:
case IMGFMT_XVMC_MOCO_MPEG2:
if(avctx->pix_fmt==PIX_FMT_XVMC_MPEG2_IDCT) return CONTROL_TRUE;
#endif
}
return CONTROL_FALSE;
}
Expand Down Expand Up @@ -604,28 +595,6 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
if(IMGFMT_IS_HWACCEL(mpi->imgfmt)) {
avctx->draw_horiz_band= draw_slice;
}
#if CONFIG_XVMC
if(IMGFMT_IS_XVMC(mpi->imgfmt)) {
struct xvmc_pix_fmt *render = mpi->priv; //same as data[2]
if(!avctx->xvmc_acceleration) {
mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "[VD_FFMPEG] The mc_get_buffer should work only with XVMC acceleration!!");
assert(0);
exit(1);
// return -1;//!!fixme check error conditions in ffmpeg
}
if(!(mpi->flags & MP_IMGFLAG_DIRECT)) {
mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, "[VD_FFMPEG] Only buffers allocated by vo_xvmc allowed.\n");
assert(0);
exit(1);
// return -1;//!!fixme check error conditions in ffmpeg
}
if(mp_msg_test(MSGT_DECVIDEO, MSGL_DBG5))
mp_msg(MSGT_DECVIDEO, MSGL_DBG5, "vd_ffmpeg::get_buffer (xvmc render=%p)\n", render);
assert(render != 0);
assert(render->xvmc_id == AV_XVMC_ID);
render->state |= AV_XVMC_STATE_PREDICTION;
}
#endif

pic->data[0]= mpi->planes[0];
pic->data[1]= mpi->planes[1];
Expand Down Expand Up @@ -710,16 +679,6 @@ static void release_buffer(struct AVCodecContext *avctx, AVFrame *pic){
// Palette support: free palette buffer allocated in get_buffer
if (mpi->bpp == 8)
av_freep(&mpi->planes[1]);
#if CONFIG_XVMC
if (IMGFMT_IS_XVMC(mpi->imgfmt)) {
struct xvmc_pix_fmt *render = (struct xvmc_pix_fmt*)pic->data[2]; //same as mpi->priv
if(mp_msg_test(MSGT_DECVIDEO, MSGL_DBG5))
mp_msg(MSGT_DECVIDEO, MSGL_DBG5, "vd_ffmpeg::release_buffer (xvmc render=%p)\n", render);
assert(render!=NULL);
assert(render->xvmc_id == AV_XVMC_ID);
render->state&=~AV_XVMC_STATE_PREDICTION;
}
#endif
// release mpi (in case MPI_IMGTYPE_NUMBERED is used, e.g. for VDPAU)
mpi->usage_count--;
}
Expand Down
4 changes: 0 additions & 4 deletions libvo/video_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ extern struct vo_driver video_out_mga;
extern struct vo_driver video_out_xmga;
extern struct vo_driver video_out_x11;
extern struct vo_driver video_out_xover;
extern struct vo_driver video_out_xvmc;
extern struct vo_driver video_out_vdpau;
extern struct vo_driver video_out_xv;
extern struct vo_driver video_out_gl_nosw;
Expand Down Expand Up @@ -229,9 +228,6 @@ const struct vo_driver *video_out_drivers[] =
#ifdef CONFIG_DIRECTFB
// vo directfb can call exit() if initialization fails
&video_out_directfb,
#endif
#if CONFIG_XVMC
&video_out_xvmc,
#endif
&video_out_mpegpes,
#ifdef CONFIG_YUV4MPEG
Expand Down
Loading

0 comments on commit cbdb7e6

Please sign in to comment.