[xiph-commits] r14013 - trunk/theora/lib/enc

maikmerten at svn.xiph.org maikmerten at svn.xiph.org
Thu Oct 18 11:43:41 PDT 2007


Author: maikmerten
Date: 2007-10-18 11:43:41 -0700 (Thu, 18 Oct 2007)
New Revision: 14013

Modified:
   trunk/theora/lib/enc/encode.c
Log:
actually implement fastest mode (no motion compensation) a bit less 
braindead (don't skip mode selection)


Modified: trunk/theora/lib/enc/encode.c
===================================================================
--- trunk/theora/lib/enc/encode.c	2007-10-18 16:59:02 UTC (rev 14012)
+++ trunk/theora/lib/enc/encode.c	2007-10-18 18:43:41 UTC (rev 14013)
@@ -1101,8 +1101,6 @@
 
   QIndex = (unsigned char)cpi->pb.FrameQIndex;
 
-  if(!cpi->MotionCompensation)
-    return 0;
 
   /* change the quatization matrix to the one at best Q to compute the
      new error score */
@@ -1215,7 +1213,7 @@
 
         /* If the best error is above the required threshold search
            for a new inter MV */
-        if ( BestError > cpi->MinImprovementForNewMV ) {
+        if ( BestError > cpi->MinImprovementForNewMV && cpi->MotionCompensation) {
           /* Use a mix of heirachical and exhaustive searches for
              quick mode. */
           if ( cpi->pb.info.quick_p ) {
@@ -1264,7 +1262,7 @@
         MBGF_MVError = HUGE_ERROR;
         GFMVect.x = 0; /* Set 0,0 motion vector */
         GFMVect.y = 0;
-        if ( BestError > cpi->MinImprovementForNewMV ) {
+        if ( BestError > cpi->MinImprovementForNewMV && cpi->MotionCompensation) {
           /* Do an MV search in the golden reference frame */
           MBGF_MVError = GetMBMVInterError( cpi, cpi->pb.GoldenFrame,
                                             YFragIndex, PixelsPerLine,
@@ -1297,7 +1295,7 @@
         /* Finally... If the best error is still to high then consider
            the 4MV mode */
         MBInterFOURMVError = HUGE_ERROR;
-        if ( BestError > cpi->FourMVThreshold ) {
+        if ( BestError > cpi->FourMVThreshold && cpi->MotionCompensation) {
           /* Get the 4MV error. */
           MBInterFOURMVError =
             GetFOURMVExhaustiveSearch( cpi, cpi->pb.LastFrameRecon,



More information about the commits mailing list