[svn] / branches / dev-api-4 / xvidcore / src / motion / motion_est.c Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/src/motion/motion_est.c

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

revision 1136, Thu Sep 4 18:40:02 2003 UTC revision 1138, Sat Sep 6 11:24:50 2003 UTC
# Line 21  Line 21 
21   *  along with this program ; if not, write to the Free Software   *  along with this program ; if not, write to the Free Software
22   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
23   *   *
24   * $Id: motion_est.c,v 1.58.2.33 2003-09-04 18:40:02 Isibaar Exp $   * $Id: motion_est.c,v 1.58.2.35 2003-09-06 11:24:50 Isibaar Exp $
25   *   *
26   ****************************************************************************/   ****************************************************************************/
27    
# Line 1005  Line 1005 
1005    
1006          second_best = *data->currentMV;          second_best = *data->currentMV;
1007    
1008          if(data->qpel_precision)          if(data->qpel_precision) {
1009                  second_best.x *= 2;     second_best.y *= 2;                  second_best.x *= 2;     second_best.y *= 2;
1010            }
1011    
1012          data->currentMV[0] = centerMV;          data->currentMV[0] = centerMV;
1013          *data->iMinSAD = best_sad;          *data->iMinSAD = best_sad;
# Line 1158  Line 1159 
1159          pMB->mcsel = 0;          pMB->mcsel = 0;
1160    
1161          /* INTER <-> INTER4V decision */          /* INTER <-> INTER4V decision */
1162          if ((Data->iMinSAD[0] + 125 < Data->iMinSAD[1] +          if ((Data->iMinSAD[0] + 75 < Data->iMinSAD[1] +
1163                  Data->iMinSAD[2] + Data->iMinSAD[3] + Data->iMinSAD[4])) { /* normal, fast, SAD-based mode decision */                  Data->iMinSAD[2] + Data->iMinSAD[3] + Data->iMinSAD[4])) { /* normal, fast, SAD-based mode decision */
1164                  if (inter4v == 0 || Data->iMinSAD[0] < Data->iMinSAD[1] + Data->iMinSAD[2] +                  if (inter4v == 0 || Data->iMinSAD[0] < Data->iMinSAD[1] + Data->iMinSAD[2] +
1165                          Data->iMinSAD[3] + Data->iMinSAD[4] + IMV16X16 * (int32_t)iQuant) {                          Data->iMinSAD[3] + Data->iMinSAD[4] + IMV16X16 * (int32_t)iQuant) {
# Line 1257  Line 1258 
1258          left = top = top_right = -1;          left = top = top_right = -1;
1259          thresh = 0;          thresh = 0;
1260    
1261          if(x > 0 && y > 0 && x < pParam->mb_width) {          if((x > 0) && (y > 0) && (x < (int32_t) pParam->mb_width)) {
1262                  left = (&pMBs[(x-1) + y * pParam->mb_width])->sad16; // left                  left = (&pMBs[(x-1) + y * pParam->mb_width])->sad16; // left
1263                  top = (&pMBs[x + (y-1) * pParam->mb_width])->sad16; // top                  top = (&pMBs[x + (y-1) * pParam->mb_width])->sad16; // top
1264                  top_right = (&pMBs[(x+1) + (y-1) * pParam->mb_width])->sad16; // top right                  top_right = (&pMBs[(x+1) + (y-1) * pParam->mb_width])->sad16; // top right
1265    
1266                  if(((&pMBs[(x-1) + y * pParam->mb_width])->mode != MODE_INTRA) &&                  if(((&pMBs[(x-1) + y * pParam->mb_width])->mode != MODE_INTRA) &&
1267                     ((&pMBs[x + (y-1) * pParam->mb_width])->mode != MODE_INTRA) &&                     ((&pMBs[x + (y-1) * pParam->mb_width])->mode != MODE_INTRA) &&
1268                     ((&pMBs[(x+1) + (y-1) * pParam->mb_width])->mode != MODE_INTRA))                     ((&pMBs[(x+1) + (y-1) * pParam->mb_width])->mode != MODE_INTRA)) {
1269                          thresh = MAX(MAX(top, left), top_right);                          thresh = MAX(MAX(top, left), top_right);
1270                    }
1271                  else                  else
1272                          thresh = MIN(MIN(top, left), top_right);                          thresh = MIN(MIN(top, left), top_right);
1273          }          }

Legend:
Removed from v.1136  
changed lines
  Added in v.1138

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