Steven wrote:
Terry Barnaby schreef:

The current MythTV CVS with XvMC VLD decoding crashes when changing
a channel.
This is due to to the test to see if a valid XvMC port is available
in the static function VideoOutputXv::GetBestSupportedCodec() on lines
820->838. This fails on a channel change as the latest XvMC code
does not close down the XvMC port and so no ports are available for the
test.
I'm not sure where is functionality should be put
(VideoOutputXv::InitXvMc() ?) so I have put a "#ifdef" around this
code.
A patch to fix this is enclosed, but as stated, the code really
needs a better change.

I think I may nearly be there with XvMC VLD decoding ...


Terry


Terry,

Just wondering. Am I supposed to use your xvmc_vld_3 and 4.patch or are these issues fixed with the code Daniel checked in to fix the OSD?
I'm asking because I get prebuffers with xvmc-vld on my epia M10000 with current cvs (without your patches). The prebuffers get worse when the osd is displayed.


Steven
_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Hi,

The current status with me is that MythTv CVS 2005-05-06 with the
enclosed patch works quite well with my Via M10K box. My
xvmc_vld patches 1,2,3 and 4 are already in the CVS as of the CVS
date above.
The enclosed patch is a bit of a hack, something better should
be done, but it does work. It just increases the number of
Vbuffers from 8 to 16 for XvMC VLD HW MPEG acceleration.

Terry
Index: libs/libmythtv/videoout_xv.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/videoout_xv.cpp,v
retrieving revision 1.140
diff -u -r1.140 videoout_xv.cpp
--- libs/libmythtv/videoout_xv.cpp	5 May 2005 16:39:42 -0000	1.140
+++ libs/libmythtv/videoout_xv.cpp	11 May 2005 08:48:00 -0000
@@ -528,11 +528,28 @@
     if (mcodecid > kCodec_NORMAL_END)
     {
         // Create ffmpeg VideoFrames    
-        vbuffers.Init(8 /*numdecode*/, false /*extra_for_pause*/,
-                      1+XVMC_OSD_RES_NUM /*need_free*/,
-                      5-XVMC_OSD_RES_NUM /*needprebuffer_normal*/,
-                      5-XVMC_OSD_RES_NUM /*needprebuffer_small*/,
-                      1 /*keepprebuffer*/, true /*use_frame_locking*/);
+
+	// This is a temprary hack to initialise more buffers for the XvMC
+	// VLD codec. Idealy this should workout how many surfaces the XvMC
+	// implementation has and use an appropriate number of buffers.
+        bool vld, idct, mc;
+        myth2av_codecid(myth_codec_id, vld, idct, mc);
+	
+	if(vld){
+        	vbuffers.Init(16 /*numdecode*/, false /*extra_for_pause*/,
+                	      1+XVMC_OSD_RES_NUM /*need_free*/,
+                	      5-XVMC_OSD_RES_NUM /*needprebuffer_normal*/,
+                	      5-XVMC_OSD_RES_NUM /*needprebuffer_small*/,
+                	      1 /*keepprebuffer*/, true /*use_frame_locking*/);
+	}
+	else {
+        	vbuffers.Init(8 /*numdecode*/, false /*extra_for_pause*/,
+                	      1+XVMC_OSD_RES_NUM /*need_free*/,
+                	      5-XVMC_OSD_RES_NUM /*needprebuffer_normal*/,
+                	      5-XVMC_OSD_RES_NUM /*needprebuffer_small*/,
+                	      1 /*keepprebuffer*/, true /*use_frame_locking*/);
+	}
+
         done = InitXvMC(mcodecid);
 
         if (!done)
_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to