[mythtv] bob deint issue with latest cvs

Daniel Thor Kristjansson danielk at mrl.nyu.edu
Fri Feb 4 17:33:57 UTC 2005


On Fri, 4 Feb 2005, Daniel Thor Kristjansson wrote:
]I only made the fix to XV because XvMC behaves a little differently, and 
]I want to look at it more carefully before making a patch.

Here's the XvMC version.

It's no really that different. I restored the 
  src_h -= (halfLineSrc) ? 2 : 0;
And it now looks good to me.

-- Daniel
-------------- next part --------------
Index: libs/libmythtv/videoout_xvmc.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/videoout_xvmc.cpp,v
retrieving revision 1.42
diff -u -r1.42 videoout_xvmc.cpp
--- libs/libmythtv/videoout_xvmc.cpp	3 Feb 2005 23:58:11 -0000	1.42
+++ libs/libmythtv/videoout_xvmc.cpp	4 Feb 2005 17:30:59 -0000
@@ -933,7 +933,7 @@
         {
             field = 2;
             halfLineSrc = (int) round(((float)disphoff)/imgh - 0.001f);
-            //src_h -= (halfLineSrc) ? 2 : 0;
+            src_h -= (halfLineSrc) ? 2 : 0;
         }
     }
 
@@ -971,7 +971,16 @@
     if (!hasVLDAcceleration())
     {
         yoff += halfLineSrc;
-        hoff -= halfLineSrc;
+        hoff -= 2 * halfLineSrc;
+    }
+
+    if (2 == field)
+    {
+        VERBOSE(VB_PLAYBACK,
+                QString("XvPut img_h(%1-%6) dest y(%2+%4) h(%3-%5)")
+                .arg(imgh).arg(yoff).arg(hoff)
+                .arg(halfLineSrc).arg(2 * halfLineSrc)
+                .arg(2 * ((halfLineSrc) ? 1 : 0))); /* 2* for imgh coords */
     }
 
     XvMCPutSurface(data->XJ_disp, surf, data->XJ_curwin,
@@ -1110,12 +1119,14 @@
     // boboff assumes the smallest interlaced resolution is 480 lines
     int boboff = (int) round(((float)disphoff)/480 - 0.001f);
     boboff = (m_deinterlacing && m_deintfiltername == "bobdeint") ? boboff : 0;
+    VERBOSE(VB_PLAYBACK, QString("disphoff(%1) boboff(%2) ndc(%3)")
+            .arg(disphoff).arg(boboff).arg((data->needdrawcolor?"yes":"no")));
 
     if (data->needdrawcolor)
     {
         XSetForeground(data->XJ_disp, data->XJ_gc, data->colorkey);
         XFillRectangle(data->XJ_disp, data->XJ_curwin, data->XJ_gc,
-                       dispx, dispy+boboff, dispw, disph);
+                       dispx, dispy+boboff, dispw, disph - 2 * boboff);
     }
 
     XSetForeground(data->XJ_disp, data->XJ_gc, XJ_black);
@@ -1128,11 +1139,11 @@
                        (dispx+dispw)-(dispxoff+dispwoff), disph);
     if (dispyoff+boboff > dispy) // top of screen
         XFillRectangle(data->XJ_disp, data->XJ_curwin, data->XJ_gc, 
-                       dispx, dispy, dispw, dispyoff+boboff-dispy);
-    if (dispyoff+disphoff < dispy+disph) // bottom of screen
+                       dispx, dispy, dispw, dispyoff + boboff - dispy);
+    if (dispyoff + disphoff < dispy + disph + boboff) // bottom of screen
         XFillRectangle(data->XJ_disp, data->XJ_curwin, data->XJ_gc, 
-                       dispx, dispyoff+disphoff, 
-                       dispw, (dispy+disph)-(dispyoff+disphoff));
+                       dispx, dispyoff + disphoff - boboff,
+                       dispw, (dispy + disph + boboff) - (dispyoff + disphoff));
 
     if (sync)
         XSync(data->XJ_disp, false);


More information about the mythtv-dev mailing list