[svn] / branches / release-1_3-branch / xvidcore / src / motion / gmc.c Repository:
ViewVC logotype

Diff of /branches/release-1_3-branch/xvidcore/src/motion/gmc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1711, Sat Jun 17 13:08:05 2006 UTC revision 1756, Tue Nov 7 19:59:03 2006 UTC
# Line 19  Line 19 
19   *  along with this program ; if not, write to the Free Software   *  along with this program ; if not, write to the Free Software
20   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21   *   *
22   * $Id: gmc.c,v 1.6 2006-06-17 13:07:55 Isibaar Exp $   * $Id: gmc.c,v 1.7 2006-11-07 19:59:03 Skal Exp $
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
# Line 27  Line 27 
27  #include "../global.h"  #include "../global.h"
28  #include "../encoder.h"  #include "../encoder.h"
29  #include "gmc.h"  #include "gmc.h"
30    #include "../utils/emms.h"
31    
32  #include <stdio.h>  #include <stdio.h>
33    
# Line 459  Line 460 
460      if ( W2>(uint32_t)U && W2>(uint32_t)(U+15*dUx) &&      if ( W2>(uint32_t)U && W2>(uint32_t)(U+15*dUx) &&
461           H2>(uint32_t)V && H2>(uint32_t)(V+15*dVx) )           H2>(uint32_t)V && H2>(uint32_t)(V+15*dVx) )
462      {      {
463          uint32_t UV1, UV2;
464        for(i=0; i<16; ++i)        for(i=0; i<16; ++i)
465        {        {
466          uint32_t u = ( U >> 16 ) << rho;          uint32_t u = ( U >> 16 ) << rho;
# Line 467  Line 469 
469          Offsets[   i] = u;          Offsets[   i] = u;
470          Offsets[16+i] = v;          Offsets[16+i] = v;
471        }        }
   
           {  
472            // batch 8 input pixels when linearity says it's ok            // batch 8 input pixels when linearity says it's ok
473          uint32_t UV1, UV2;  
474          UV1 = (Offsets[0] | (Offsets[16]<<16)) & 0xfff0fff0U;          UV1 = (Offsets[0] | (Offsets[16]<<16)) & 0xfff0fff0U;
475          UV2 = (Offsets[7] | (Offsets[23]<<16)) & 0xfff0fff0U;          UV2 = (Offsets[7] | (Offsets[23]<<16)) & 0xfff0fff0U;
476          if (UV1+7*16==UV2)          if (UV1+7*16==UV2)
# Line 484  Line 484 
484          else          else
485            GMC_Core_Non_Lin_8(dst+8, Offsets+8, src, srcstride, Rounder);            GMC_Core_Non_Lin_8(dst+8, Offsets+8, src, srcstride, Rounder);
486            }            }
         }  
487      else      else
488      {      {
489        for(i=0; i<16; ++i)        for(i=0; i<16; ++i)
# Line 535  Line 534 
534      if ( W2>(uint32_t)U && W2>(uint32_t)(U+15*dUx) &&      if ( W2>(uint32_t)U && W2>(uint32_t)(U+15*dUx) &&
535           H2>(uint32_t)V && H2>(uint32_t)(V+15*dVx) )           H2>(uint32_t)V && H2>(uint32_t)(V+15*dVx) )
536      {      {
537          uint32_t UV1, UV2;
538        for(i=0; i<8; ++i)        for(i=0; i<8; ++i)
539        {        {
540          int32_t u = ( U >> 16 ) << rho;          int32_t u = ( U >> 16 ) << rho;
# Line 544  Line 544 
544          Offsets[16+i] = v;          Offsets[16+i] = v;
545        }        }
546    
           {  
547            // batch 8 input pixels when linearity says it's ok            // batch 8 input pixels when linearity says it's ok
548          const uint32_t UV1 = (Offsets[ 0] | (Offsets[16]<<16)) & 0xfff0fff0U;                          UV1 = (Offsets[ 0] | (Offsets[16]<<16)) & 0xfff0fff0U;
549          const uint32_t UV2 = (Offsets[ 7] | (Offsets[23]<<16)) & 0xfff0fff0U;                          UV2 = (Offsets[ 7] | (Offsets[23]<<16)) & 0xfff0fff0U;
550          if (UV1+7*16==UV2)          if (UV1+7*16==UV2)
551                  {                  {
552            const uint32_t Off = (Offsets[0]>>4) + (Offsets[16]>>4)*srcstride;            const uint32_t Off = (Offsets[0]>>4) + (Offsets[16]>>4)*srcstride;
# Line 559  Line 558 
558            GMC_Core_Non_Lin_8(vDst, Offsets, vSrc, srcstride, Rounder);            GMC_Core_Non_Lin_8(vDst, Offsets, vSrc, srcstride, Rounder);
559                  }                  }
560            }            }
     }  
561      else      else
562      {      {
563        for(i=0; i<8; ++i)        for(i=0; i<8; ++i)
# Line 740  Line 738 
738    
739                          pMBs[mbnum].mcsel = 0; /* until mode decision */                          pMBs[mbnum].mcsel = 0; /* until mode decision */
740          }          }
741      emms();
742  }  }

Legend:
Removed from v.1711  
changed lines
  Added in v.1756

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4