[mythtv] --disable-xvmc-vld broken / workaround

Randall Hopper viznut at charter.net
Sat Dec 31 11:08:11 EST 2005


     I just built MythTV (SVN from 12/30/05) on SuSE 9.3 for Athlon64
(64-bit) for an NVidia front-end.

To get MythTV to build without VLD XvMC, I needed the following hack (see
perl substititions after configure command):

  ./configure --prefix=/opt/pkg/mythtv-svn-${myth_date}        \
              --arch=k8 --enable-proc-opt --enable-xvmc        \
              --disable-xvmc-vld --enable-dvb --enable-dvb-eit \
              --enable-opengl-vsync
  perl -pi -e 's/(CONFIG_MPEG_XVMC_DECODER) 1/\1 0/' libs/libmyth/mythconfig.h
  perl -pi -e 's/(CONFIG_MPEG_XVMC_VLD_DECODER)=yes/\1=no/' libs/libmyth/mythconfig.mak
  qmake mythtv.pro
  make
  make install

------------------------------------------------------------------------------
More detail (if you care):
------------------------------------------------------------------------------

I wanted to build MythTV with XvMC, but "without" VLD XvMC.

The reason I wanted to do this is that SuSE 9.3 only delivers a 32-bit
libviaXvMC.so library, but not a 64-bit libviaXvMC.so.  Also, I'm using an
NVidia card so I don't need VLD XvMC (AFAIK).

So I configured MythTV with "--enable-xvmc --disable-xvmc-vld".

However, mythtv failed to link with undefined VLD XvMC references in
libavcodec:

  XvMCLoadQMatrix
  XvMCBeginSurface

These are referenced only in ./libs/libavcodec/xvmcvldvideo.c.  This code
shouldn't have been pulled in.  

Here's what happened:

1) CFLAGS/CXXFLAGS in libs/libavcodec/Makefile contains -DHAVE_XVMC, but
   not -DHAVE_XVMC_VLD, as expected.

2) MYTH_BUILD_CONFIG in config.h contains "using_xvmc" but not
   "using_xvmc_vld", as expected.

3) config.mak contains:

   CONFIG_XVMC_LIBS=-lXvMCNVIDIA -lXvMC

   again as expected.

4) BUT the problem is that the generated config.h contains:

     #define CONFIG_MPEG_XVMC_VLD_DECODER 1 <---------- Wrong!

   and config.mak contains:

     CONFIG_MPEG_XVMC_VLD_DECODER=yes       <---------- Wrong!

   These are written in this simple loop in "configure":

     for codec in $CODEC_LIST ; do
         echo "#define CONFIG_`echo $codec | tr a-z A-Z` 1" >> $TMPH
         echo "CONFIG_`echo $codec | tr a-z A-Z`=yes" >> $MYTH_CONFIG_MAK
     done

   that somewhat blindly assumes we want all the "codecs" (not sure VLD
   XvMC is a codec, but anyway).  This is incorrect.  MythTV explicitly
   decided not to link with the libraries defining the VLD XvMC symbols
   which would allow the XVMC_VLD_DECODER code to link (libviaXvMC.so), so
   CONFIG_MPEG_XVMC_VLD_DECODER should be set to 0 and no in config.h and
   config.mak, respectively.

Should configure be updated to write these XVMC_VLD variables correctly?

Thanks,

Randall


More information about the mythtv-dev mailing list