[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 141, Thu Apr 25 23:24:59 2002 UTC revision 152, Wed May 1 13:00:02 2002 UTC
# Line 2  Line 2 
2   *   *
3   *  Modifications:   *  Modifications:
4   *   *
5     *      01.05.2002      updated MotionEstimationBVOP
6   *      25.04.2002 partial prevMB conversion   *      25.04.2002 partial prevMB conversion
7   *  22.04.2002 remove some compile warning by chenm001 <chenm001@163.com>   *  22.04.2002 remove some compile warning by chenm001 <chenm001@163.com>
8   *  14.04.2002 added MotionEstimationBVOP()   *  14.04.2002 added MotionEstimationBVOP()
# Line 2038  Line 2039 
2039  // TODO: need to incorporate prediction here (eg. sad += calc_delta_16)  // TODO: need to incorporate prediction here (eg. sad += calc_delta_16)
2040  ***************************************************************/  ***************************************************************/
2041    
2042  /*  
2043  void MotionEstimationBVOP(  void MotionEstimationBVOP(
2044                          MBParam * const pParam,                          MBParam * const pParam,
2045                          FRAMEINFO * const frame,                          FRAMEINFO * const frame,
# Line 2060  Line 2061 
2061      const uint32_t mb_height = pParam->mb_height;      const uint32_t mb_height = pParam->mb_height;
2062          const int32_t edged_width = pParam->edged_width;          const int32_t edged_width = pParam->edged_width;
2063    
2064          int32_t i,j;          uint32_t i,j;
2065    
2066          int32_t f_sad16;          int32_t f_sad16;
2067          int32_t b_sad16;          int32_t b_sad16;
# Line 2084  Line 2085 
2085                                  && b_mb->mvs[0].x == 0                                  && b_mb->mvs[0].x == 0
2086                                  && b_mb->mvs[0].y == 0)                                  && b_mb->mvs[0].y == 0)
2087                          {                          {
2088                                  mb->mode = MB_IGNORE;                                  mb->mode = MODE_NOT_CODED;
2089                                  mb->mvs[0].x = 0;                                  mb->mvs[0].x = 0;
2090                                  mb->mvs[0].y = 0;                                  mb->mvs[0].y = 0;
2091                                  mb->b_mvs[0].x = 0;                                  mb->b_mvs[0].x = 0;
# Line 2099  Line 2100 
2100                                                  i, j,                                                  i, j,
2101                                                  frame->motion_flags,  frame->quant, frame->fcode,                                                  frame->motion_flags,  frame->quant, frame->fcode,
2102                                                  pParam,                                                  pParam,
2103                                                  f_mbs,                                                  f_mbs, f_mbs /* todo */,
2104                                                  &mb->mvs[0], &pmv_dontcare);    // ignore pmv                                                  &mb->mvs[0], &pmv_dontcare);    // ignore pmv
2105    
2106                          // backward search                          // backward search
# Line 2108  Line 2109 
2109                                                  i, j,                                                  i, j,
2110                                                  frame->motion_flags,  frame->quant, frame->bcode,                                                  frame->motion_flags,  frame->quant, frame->bcode,
2111                                                  pParam,                                                  pParam,
2112                                                  b_mbs,                                                  b_mbs, b_mbs, /* todo */
2113                                                  &mb->b_mvs[0], &pmv_dontcare);  // ignore pmv                                                  &mb->b_mvs[0], &pmv_dontcare);  // ignore pmv
2114    
2115                          // interpolate search (simple, but effective)                          // interpolate search (simple, but effective)
# Line 2128  Line 2129 
2129                          if (f_sad16 < b_sad16)                          if (f_sad16 < b_sad16)
2130                          {                          {
2131                                  best_sad = f_sad16;                                  best_sad = f_sad16;
2132                                  mb->mode = MB_FORWARD;                                  mb->mode = MODE_FORWARD;
2133                          }                          }
2134                          else                          else
2135                          {                          {
2136                                  best_sad = b_sad16;                                  best_sad = b_sad16;
2137                                  mb->mode = MB_BACKWARD;                                  mb->mode = MODE_BACKWARD;
2138                          }                          }
2139    
2140                          if (i_sad16 < best_sad)                          if (i_sad16 < best_sad)
2141                          {                          {
2142                                  best_sad = i_sad16;                                  best_sad = i_sad16;
2143                                  mb->mode = MB_INTERPOLATE;                                  mb->mode = MODE_INTERPOLATE;
2144                          }                          }
2145    
2146                          if (d_sad16 < best_sad)                          if (d_sad16 < best_sad)
2147                          {                          {
2148                                  best_sad = d_sad16;                                  best_sad = d_sad16;
2149                                  mb->mode = MB_DIRECT;                                  mb->mode = MODE_DIRECT;
2150                          }                          }
2151    
2152                  }                  }
2153          }          }
2154  }  }
   
 */  

Legend:
Removed from v.141  
changed lines
  Added in v.152

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