[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xine-cvslog
Subject:    [xine-cvs] CVS: xine-lib/src/video_out video_out_xv.c,1.159,1.160
From:       Ewald Snel <esnel () users ! sourceforge ! net>
Date:       2003-03-05 22:12:53
[Download RAW message or body]

Update of /cvsroot/xine/xine-lib/src/video_out
In directory sc8-pr-cvs1:/tmp/cvs-serv16683/xine-lib/src/video_out

Modified Files:
	video_out_xv.c 
Log Message:
Add option to fix alignment problem with some (buggy) XVideo drivers
Undo previous change to libreal (bug is general video decoding problem)


Index: video_out_xv.c
===================================================================
RCS file: /cvsroot/xine/xine-lib/src/video_out/video_out_xv.c,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -r1.159 -r1.160
--- video_out_xv.c	28 Feb 2003 02:51:51 -0000	1.159
+++ video_out_xv.c	5 Mar 2003 22:12:48 -0000	1.160
@@ -118,6 +118,7 @@
   int                expecting_event; /* completion event handling */
   int                completion_event;
   int                use_shm;
+  int                use_pitch_alignment;
   xv_property_t      props[VO_NUM_PROPERTIES];
   uint32_t           capabilities;
 
@@ -244,6 +245,10 @@
   unsigned int  xv_format;
   XvImage      *image=NULL;
 
+  if (this->use_pitch_alignment) {
+    width = (width + 7) & ~0x7;
+  }
+
   switch (format) {
   case XINE_IMGFMT_YV12:
     xv_format = this->xv_format_yv12;
@@ -394,6 +399,10 @@
   xv_driver_t  *this = (xv_driver_t *) this_gen;
   xv_frame_t   *frame = (xv_frame_t *) frame_gen;
 
+  if (this->use_pitch_alignment) {
+    width = (width + 7) & ~0x7;
+  }
+
   if ((frame->width != width)
       || (frame->height != height)
       || (frame->format != format)) {
@@ -1118,6 +1127,12 @@
   printf("video_out_xv: double buffering mode = %d\n",xv_double_buffer);
 }
 
+static void xv_update_xv_pitch_alignment(void *this_gen, xine_cfg_entry_t *entry) {
+  xv_driver_t *this = (xv_driver_t *) this_gen;
+
+  this->use_pitch_alignment = entry->num_value;
+}
+
 
 static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *visual_gen) {
 
@@ -1313,6 +1328,10 @@
     this->completion_event = XShmGetEventBase(display) + ShmCompletion;
   else
     this->completion_event = -1;
+
+  this->use_pitch_alignment = config->register_bool (config, "video.xv_pitch_alignment", 0,
+						    _("workaround for some (buggy) XVideo drivers"),
+						    NULL, 10, xv_update_xv_pitch_alignment, this);
 
   this->deinterlace_method = config->register_enum (config, "video.deinterlace_method", 4,
 						    deinterlace_methods,



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Xine-cvslog mailing list
Xine-cvslog@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-cvslog
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic