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

Diff of /xvidcore/src/decoder.c

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

revision 1.51.2.1, Sun Apr 11 08:11:09 2004 UTC revision 1.51.2.5, Fri Jun 4 11:54:41 2004 UTC
# Line 222  Line 222 
222          dec->time = dec->time_base = dec->last_time_base = 0;          dec->time = dec->time_base = dec->last_time_base = 0;
223          dec->low_delay = 0;          dec->low_delay = 0;
224          dec->packed_mode = 0;          dec->packed_mode = 0;
225            dec->time_inc_resolution = 1; /* until VOL header says otherwise */
226    
227          dec->fixed_dimensions = (dec->width > 0 && dec->height > 0);          dec->fixed_dimensions = (dec->width > 0 && dec->height > 0);
228    
# Line 338  Line 339 
339                  stop_coding_timer();                  stop_coding_timer();
340    
341                  start_timer();                  start_timer();
342                  add_acdc(pMB, i, &block[i * 64], iDcScaler, predictors);                  add_acdc(pMB, i, &block[i * 64], iDcScaler, predictors, dec->bs_version);
343                  stop_prediction_timer();                  stop_prediction_timer();
344    
345                  start_timer();                  start_timer();
# Line 1214  Line 1215 
1215          uint32_t x, y;          uint32_t x, y;
1216          VECTOR mv;          VECTOR mv;
1217          const VECTOR zeromv = {0,0};          const VECTOR zeromv = {0,0};
         const int64_t TRB = dec->time_pp - dec->time_bp, TRD = dec->time_pp;  
1218          int i;          int i;
1219    
1220          start_timer();          start_timer();
# Line 1309  Line 1309 
1309    
1310                          case MODE_DIRECT_NONE_MV:                          case MODE_DIRECT_NONE_MV:
1311                                  for (i = 0; i < 4; i++) {                                  for (i = 0; i < 4; i++) {
1312                                          mb->mvs[i].x = (int32_t) ((TRB * last_mb->mvs[i].x) / TRD + mv.x);                                          mb->mvs[i].x = last_mb->mvs[i].x*dec->time_bp/dec->time_pp + mv.x;
1313                                          mb->b_mvs[i].x = (int32_t) ((mv.x == 0)                                          mb->mvs[i].y = last_mb->mvs[i].y*dec->time_bp/dec->time_pp + mv.y;
1314                                                                          ? ((TRB - TRD) * last_mb->mvs[i].x) / TRD  
1315                                                                          : mb->mvs[i].x - last_mb->mvs[i].x);                                          mb->b_mvs[i].x = (mv.x)
1316                                          mb->mvs[i].y = (int32_t) ((TRB * last_mb->mvs[i].y) / TRD + mv.y);                                                  ?  mb->mvs[i].x - last_mb->mvs[i].x
1317                                          mb->b_mvs[i].y = (int32_t) ((mv.y == 0)                                                  : last_mb->mvs[i].x*(dec->time_bp - dec->time_pp)/dec->time_pp;
1318                                                                          ? ((TRB - TRD) * last_mb->mvs[i].y) / TRD                                          mb->b_mvs[i].y = (mv.y)
1319                                                                          : mb->mvs[i].y - last_mb->mvs[i].y);                                                  ? mb->mvs[i].y - last_mb->mvs[i].y
1320                                                    : last_mb->mvs[i].y*(dec->time_bp - dec->time_pp)/dec->time_pp;
1321                                  }                                  }
1322    
1323                                  decoder_bf_interpolate_mbinter(dec, dec->refn[1], dec->refn[0],                                  decoder_bf_interpolate_mbinter(dec, dec->refn[1], dec->refn[0],
# Line 1489  Line 1490 
1490                  goto repeat;                  goto repeat;
1491          }          }
1492    
1493            if(dec->frames == 0 && coding_type != I_VOP) {
1494                    /* 1st frame is not an i-vop */
1495                    goto repeat;
1496            }
1497    
1498          dec->p_bmv.x = dec->p_bmv.y = dec->p_fmv.y = dec->p_fmv.y = 0;  /* init pred vector to 0 */          dec->p_bmv.x = dec->p_bmv.y = dec->p_fmv.y = dec->p_fmv.y = 0;  /* init pred vector to 0 */
1499    
1500          /* packed_mode: special-N_VOP treament */          /* packed_mode: special-N_VOP treament */

Legend:
Removed from v.1.51.2.1  
changed lines
  Added in v.1.51.2.5

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