[svn] / trunk / xvidcore / src / prediction / mbprediction.c Repository:
ViewVC logotype

Diff of /trunk/xvidcore/src/prediction/mbprediction.c

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

revision 3, Fri Mar 8 02:46:11 2002 UTC revision 136, Thu Apr 25 06:55:00 2002 UTC
# Line 364  Line 364 
364  }  }
365    
366    
367  void MBPrediction(MBParam *pParam, uint32_t x, uint32_t y,  void MBPrediction(FRAMEINFO *frame,
368                                    uint32_t mb_width, int16_t qcoeff[][64], MACROBLOCK *mbs)                    uint32_t x,
369                      uint32_t y,
370                      uint32_t mb_width,
371                      int16_t qcoeff[6*64])
372  {  {
373    
374      int32_t j;      int32_t j;
375          int32_t iDcScaler, iQuant = pParam->quant;          int32_t iDcScaler, iQuant = frame->quant;
376          int32_t S = 0;          int32_t S = 0;
377          int16_t predictors[6][8];          int16_t predictors[6][8];
378    
379      MACROBLOCK *pMB = &mbs[x + y * mb_width];          MACROBLOCK *pMB = &frame->mbs[x + y * mb_width];
380    
381      if ((pMB->mode == MODE_INTRA) || (pMB->mode == MODE_INTRA_Q)) {      if ((pMB->mode == MODE_INTRA) || (pMB->mode == MODE_INTRA_Q)) {
382    
# Line 380  Line 384 
384                  {                  {
385                          iDcScaler = get_dc_scaler(iQuant, (j < 4) ? 1 : 0);                          iDcScaler = get_dc_scaler(iQuant, (j < 4) ? 1 : 0);
386    
387                          predict_acdc(mbs, x, y, mb_width, j, qcoeff[j], iQuant, iDcScaler, predictors[j]);                          predict_acdc(frame->mbs,
388                          S += calc_acdc(pMB, j, qcoeff[j], iDcScaler, predictors[j]);                                       x,
389                                         y,
390                                         mb_width,
391                                         j,
392                                         &qcoeff[j*64],
393                                         iQuant,
394                                         iDcScaler,
395                                         predictors[j]);
396    
397                            S += calc_acdc(pMB,
398                                           j,
399                                           &qcoeff[j*64],
400                                           iDcScaler,
401                                           predictors[j]);
402    
403                  }                  }
404    
405                  if (S < 0)              // dont predict                  if (S < 0)              // dont predict
# Line 395  Line 413 
413                  {                  {
414                          for(j = 0; j < 6; j++)                          for(j = 0; j < 6; j++)
415                          {                          {
416                                   apply_acdc(pMB, j, qcoeff[j], predictors[j]);                                  apply_acdc(pMB, j, &qcoeff[j*64], predictors[j]);
417                          }                          }
418                  }                  }
419                  pMB->cbp = calc_cbp(qcoeff);                  pMB->cbp = calc_cbp(qcoeff);
420          }          }
421    
422  }  }

Legend:
Removed from v.3  
changed lines
  Added in v.136

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