[cvs] / xvidcore / src / motion / estimation_gmc.c Repository:
ViewVC logotype

Diff of /xvidcore/src/motion/estimation_gmc.c

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

revision 1.1.2.2, Tue Sep 30 18:20:31 2003 UTC revision 1.5, Sun Dec 5 04:53:01 2004 UTC
# Line 39  Line 39 
39  #include "motion_inlines.h"  #include "motion_inlines.h"
40    
41  static void  static void
42  CheckCandidate16I(const int x, const int y, const SearchData * const data, const unsigned int Direction)  CheckCandidate16I(const int x, const int y, SearchData * const data, const unsigned int Direction)
43  {  {
44          int sad;          int sad;
45          const uint8_t * Reference;          const uint8_t * Reference;
# Line 54  Line 54 
54          if (sad < data->iMinSAD[0]) {          if (sad < data->iMinSAD[0]) {
55                  data->iMinSAD[0] = sad;                  data->iMinSAD[0] = sad;
56                  data->currentMV[0].x = x; data->currentMV[0].y = y;                  data->currentMV[0].x = x; data->currentMV[0].y = y;
57                  *data->dir = Direction;                  data->dir = Direction;
58          }          }
59  }  }
60    
# Line 78  Line 78 
78          Data->predMV = get_pmv2(pMBs, pParam->mb_width, 0, x, y, 0);          Data->predMV = get_pmv2(pMBs, pParam->mb_width, 0, x, y, 0);
79    
80          get_range(&Data->min_dx, &Data->max_dx, &Data->min_dy, &Data->max_dy, x, y, 4,          get_range(&Data->min_dx, &Data->max_dx, &Data->min_dy, &Data->max_dy, x, y, 4,
81                                  pParam->width, pParam->height, 16, 1, 0);                                  pParam->width, pParam->height, 16, 1);
82    
83          Data->Cur = pCur + 16*(x + y * pParam->edged_width);          Data->Cur = pCur + 16*(x + y * pParam->edged_width);
84          Data->RefP[0] = pRef + 16*(x + y * pParam->edged_width);          Data->RefP[0] = pRef + 16*(x + y * pParam->edged_width);
# Line 94  Line 94 
94    
95          xvid_me_DiamondSearch(Data->currentMV[0].x, Data->currentMV[0].y, Data, 255, CheckCandidate16I);          xvid_me_DiamondSearch(Data->currentMV[0].x, Data->currentMV[0].y, Data, 255, CheckCandidate16I);
96    
97          xvid_me_SubpelRefine(Data, CheckCandidate16I);          xvid_me_SubpelRefine(Data->currentMV[0], Data, CheckCandidate16I, 0);
98    
99    
100          /* for QPel halfpel positions are worse than in halfpel mode :( */          /* for QPel halfpel positions are worse than in halfpel mode :( */
# Line 111  Line 111 
111          pMB->mvs[0] = pMB->mvs[1] = pMB->mvs[2] = pMB->mvs[3] = Data->currentMV[0];          pMB->mvs[0] = pMB->mvs[1] = pMB->mvs[2] = pMB->mvs[3] = Data->currentMV[0];
112          pMB->sad16 = Data->iMinSAD[0];          pMB->sad16 = Data->iMinSAD[0];
113          pMB->mode = MODE_INTER;          pMB->mode = MODE_INTER;
114          pMB->sad16 += 10*d_mv_bits(pMB->mvs[0].x, pMB->mvs[0].y, Data->predMV, Data->iFcode, 0, 0);          pMB->sad16 += 10*d_mv_bits(pMB->mvs[0].x, pMB->mvs[0].y, Data->predMV, Data->iFcode, 0);
115          return;          return;
116  }  }
117    
# Line 129  Line 129 
129          const IMAGE * const pCurrent = &current->image;          const IMAGE * const pCurrent = &current->image;
130          const IMAGE * const pReference = &reference->image;          const IMAGE * const pReference = &reference->image;
131    
         int32_t iMinSAD[5], temp[5];  
         VECTOR currentMV[5];  
         uint32_t dir;  
132          SearchData Data;          SearchData Data;
133          memset(&Data, 0, sizeof(SearchData));          memset(&Data, 0, sizeof(SearchData));
134    
135          Data.iEdgedWidth = pParam->edged_width;          Data.iEdgedWidth = pParam->edged_width;
136          Data.rounding = pParam->m_rounding_type;          Data.rounding = pParam->m_rounding_type;
137    
         Data.currentMV = &currentMV[0];  
         Data.iMinSAD = &iMinSAD[0];  
138          Data.iFcode = current->fcode;          Data.iFcode = current->fcode;
         Data.temp = temp;  
         Data.dir = &dir;  
139    
140          if (sadInit) (*sadInit) ();          if (sadInit) (*sadInit) ();
141    

Legend:
Removed from v.1.1.2.2  
changed lines
  Added in v.1.5

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