[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 677, Tue Nov 26 23:44:11 2002 UTC revision 723, Sun Dec 15 01:21:12 2002 UTC
# Line 51  Line 51 
51   *  exception also makes it possible to release a modified version which   *  exception also makes it possible to release a modified version which
52   *  carries forward this exception.   *  carries forward this exception.
53   *   *
54   * $Id: mbprediction.c,v 1.11 2002-11-26 23:44:11 edgomez Exp $   * $Id: mbprediction.c,v 1.12 2002-12-15 01:21:12 edgomez Exp $
55   *   *
56   ****************************************************************************/   ****************************************************************************/
57    
# Line 233  Line 233 
233    
234          if (ABS(pLeft[0] - pDiag[0]) < ABS(pDiag[0] - pTop[0])) {          if (ABS(pLeft[0] - pDiag[0]) < ABS(pDiag[0] - pTop[0])) {
235                  *acpred_direction = 1;  /* vertical */                  *acpred_direction = 1;  /* vertical */
236                  predictors[0] = DIV_DIV(pTop[0], iDcScaler);                  predictors[0] = (int16_t)(DIV_DIV(pTop[0], iDcScaler));
237                  for (i = 1; i < 8; i++) {                  for (i = 1; i < 8; i++) {
238                          predictors[i] = rescale(top_quant, current_quant, pTop[i]);                          predictors[i] = rescale(top_quant, current_quant, pTop[i]);
239                  }                  }
240          } else {          } else {
241                  *acpred_direction = 2;  /* horizontal */                  *acpred_direction = 2;  /* horizontal */
242                  predictors[0] = DIV_DIV(pLeft[0], iDcScaler);                  predictors[0] = (int16_t)(DIV_DIV(pLeft[0], iDcScaler));
243                  for (i = 1; i < 8; i++) {                  for (i = 1; i < 8; i++) {
244                          predictors[i] = rescale(left_quant, current_quant, pLeft[i + 7]);                          predictors[i] = rescale(left_quant, current_quant, pLeft[i + 7]);
245                  }                  }
# Line 266  Line 266 
266          DPRINTF(DPRINTF_COEFF,"predictor[0] %i", predictors[0]);          DPRINTF(DPRINTF_COEFF,"predictor[0] %i", predictors[0]);
267    
268          dct_codes[0] += predictors[0];  /* dc prediction */          dct_codes[0] += predictors[0];  /* dc prediction */
269          pCurrent[0] = dct_codes[0] * iDcScaler;          pCurrent[0] = (int16_t)(dct_codes[0] * iDcScaler);
270    
271          if (acpred_direction == 1) {          if (acpred_direction == 1) {
272                  for (i = 1; i < 8; i++) {                  for (i = 1; i < 8; i++) {
# Line 324  Line 324 
324    
325          /* store current coeffs to pred_values[] for future prediction */          /* store current coeffs to pred_values[] for future prediction */
326    
327          pCurrent[0] = qcoeff[0] * iDcScaler;          pCurrent[0] = (int16_t)(qcoeff[0] * iDcScaler);
328          for (i = 1; i < 8; i++) {          for (i = 1; i < 8; i++) {
329                  pCurrent[i] = qcoeff[i];                  pCurrent[i] = qcoeff[i];
330                  pCurrent[i + 7] = qcoeff[i * 8];                  pCurrent[i + 7] = qcoeff[i * 8];

Legend:
Removed from v.677  
changed lines
  Added in v.723

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