[svn] / trunk / xvidcore / src / motion / motion_est.c Repository:
ViewVC logotype

Diff of /trunk/xvidcore/src/motion/motion_est.c

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

revision 195, Wed Jun 12 20:38:41 2002 UTC revision 248, Fri Jun 28 15:14:40 2002 UTC
# Line 1280  Line 1280 
1280          }          }
1281    
1282          /* because we might use something like IF (dx>max_dx) THEN dx=max_dx; */          /* because we might use something like IF (dx>max_dx) THEN dx=max_dx; */
1283          bPredEq = get_pmvdata(pMBs, x, y, iWcount, 0, pmv, psad);          bPredEq = get_pmvdata(pMBs, x, y, iWcount, 0, pmv, psad, 0, 0);
1284    
1285          if ((x == 0) && (y == 0)) {          if ((x == 0) && (y == 0)) {
1286                  threshA = 512;                  threshA = 512;
# Line 1699  Line 1699 
1699    
1700          /* because we might use IF (dx>max_dx) THEN dx=max_dx; */          /* because we might use IF (dx>max_dx) THEN dx=max_dx; */
1701          bPredEq =          bPredEq =
1702                  get_pmvdata(pMBs, (x >> 1), (y >> 1), iWcount, iSubBlock, pmv, psad);                  get_pmvdata(pMBs, (x >> 1), (y >> 1), iWcount, iSubBlock, pmv, psad, 0, 0);
1703    
1704          if ((x == 0) && (y == 0)) {          if ((x == 0) && (y == 0)) {
1705                  threshA = 512 / 4;                  threshA = 512 / 4;
# Line 2009  Line 2009 
2009                  max_dy = EVEN(max_dy);                  max_dy = EVEN(max_dy);
2010          }          }
2011          /* because we might use something like IF (dx>max_dx) THEN dx=max_dx; */          /* because we might use something like IF (dx>max_dx) THEN dx=max_dx; */
2012          bPredEq = get_pmvdata(pMBs, x, y, iWcount, 0, pmv, psad);          bPredEq = get_pmvdata(pMBs, x, y, iWcount, 0, pmv, psad, 0, 0);
2013    
2014  /* Step 4: Calculate SAD around the Median prediction.  /* Step 4: Calculate SAD around the Median prediction.
2015          MinSAD=SAD          MinSAD=SAD
# Line 2287  Line 2287 
2287                  max_dy = EVEN(max_dy);                  max_dy = EVEN(max_dy);
2288          }          }
2289          /* because we might use something like IF (dx>max_dx) THEN dx=max_dx; */          /* because we might use something like IF (dx>max_dx) THEN dx=max_dx; */
2290          bPredEq = get_pmvdata(pMBs, x >> 1, y >> 1, iWcount, iSubBlock, pmv, psad);          bPredEq = get_pmvdata(pMBs, x >> 1, y >> 1, iWcount, iSubBlock, pmv, psad, 0, 0);
2291    
2292    
2293  /* Step 4: Calculate SAD around the Median prediction.  /* Step 4: Calculate SAD around the Median prediction.
# Line 2521  Line 2521 
2521                                  mb->b_mvs[0].y = 0;                                  mb->b_mvs[0].y = 0;
2522                                  continue;                                  continue;
2523                          }                          }
2524                    /* force F_SAD16
2525                            f_sad16 = 100;
2526                            b_sad16 = 65535;
2527    
2528                            mb->mode = MODE_FORWARD;
2529                            mb->mvs[0].x = 1;
2530                            mb->mvs[0].y = 1;
2531                            mb->b_mvs[0].x = 1;
2532                            mb->b_mvs[0].y = 1;
2533                            continue;
2534                     ^^ force F_SAD16 */
2535    
2536    
2537                          // forward search                          // forward search
2538                          f_sad16 =                          f_sad16 =
2539                                  SEARCH16(f_ref->y, f_refH->y, f_refV->y, f_refHV->y,                                  SEARCH16(f_ref->y, f_refH->y, f_refV->y, f_refHV->y,
2540                                                   &frame->image, i, j, frame->motion_flags,                                                   &frame->image, i, j, frame->motion_flags,
2541                                                   frame->quant, frame->fcode, pParam, f_mbs,                                                   frame->quant, frame->fcode, pParam,
2542                                                   f_mbs /* todo */ ,                                                   f_mbs,  f_mbs, /* todo */
2543                                                   &mb->mvs[0], &pmv_dontcare);   // ignore pmv                                                   &mb->mvs[0], &pmv_dontcare);   // ignore pmv
2544    
2545                          // backward search                          // backward search
2546                          b_sad16 = SEARCH16(b_ref->y, b_refH->y, b_refV->y, b_refHV->y, &frame->image, i, j, frame->motion_flags, frame->quant, frame->bcode, pParam, b_mbs, b_mbs,      /* todo */                          b_sad16 = SEARCH16(b_ref->y, b_refH->y, b_refV->y, b_refHV->y,
2547                                                    &frame->image, i, j, frame->motion_flags,
2548                                                    frame->quant, frame->bcode, pParam,
2549                                                    b_mbs, b_mbs,   /* todo */
2550                                                             &mb->b_mvs[0], &pmv_dontcare);       // ignore pmv                                                             &mb->b_mvs[0], &pmv_dontcare);       // ignore pmv
2551    
2552                          // interpolate search (simple, but effective)                          // interpolate search (simple, but effective)
2553                            i_sad16 = 65535;
2554    
2555                            /*
2556                            x/y range somewhat buggy
2557                          i_sad16 =                          i_sad16 =
2558                                  sad16bi_c(frame->image.y + i * 16 + j * 16 * edged_width,                                  sad16bi_c(frame->image.y + i * 16 + j * 16 * edged_width,
2559                                                    get_ref(f_ref->y, f_refH->y, f_refV->y, f_refHV->y,                                                    get_ref(f_ref->y, f_refH->y, f_refV->y, f_refHV->y,
# Line 2546  Line 2565 
2565                                                                                                                  mb->b_mvs[0].x,                                                                                                                  mb->b_mvs[0].x,
2566                                                                                                                  edged_width),                                                                                                                  edged_width),
2567                                                    edged_width);                                                    edged_width);
2568                            */
2569    
2570                          // TODO: direct search                          // TODO: direct search
2571                          // predictor + range of [-32,32]                          // predictor + range of [-32,32]

Legend:
Removed from v.195  
changed lines
  Added in v.248

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