[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 248, Fri Jun 28 15:14:40 2002 UTC revision 254, Wed Jul 3 12:32:50 2002 UTC
# Line 92  Line 92 
92                           uint32_t current_quant,                           uint32_t current_quant,
93                           int32_t iDcScaler,                           int32_t iDcScaler,
94                           int16_t predictors[8],                           int16_t predictors[8],
95                          const unsigned int bound_x,                          const int bound)
                         const unsigned int bound_y)  
96    
97  {  {
98          const unsigned bound = (bound_y * mb_width) + bound_x;          const int mbpos = (y * mb_width) + x;
         const unsigned mbpos = (y * mb_width) + x;  
99          int16_t *left, *top, *diag, *current;          int16_t *left, *top, *diag, *current;
100    
101          int32_t left_quant = current_quant;          int32_t left_quant = current_quant;
# Line 127  Line 125 
125          }          }
126          // top macroblock          // top macroblock
127    
128          if (mbpos >= bound + mb_width &&          if (mbpos >= bound + (int)mb_width &&
129                  (pMBs[index - mb_width].mode == MODE_INTRA ||                  (pMBs[index - mb_width].mode == MODE_INTRA ||
130                   pMBs[index - mb_width].mode == MODE_INTRA_Q)) {                   pMBs[index - mb_width].mode == MODE_INTRA_Q)) {
131    
# Line 136  Line 134 
134          }          }
135          // diag macroblock          // diag macroblock
136    
137          if (x && mbpos >= bound + mb_width + 1 &&          if (x && mbpos >= bound + (int)mb_width + 1 &&
138                  (pMBs[index - 1 - mb_width].mode == MODE_INTRA ||                  (pMBs[index - 1 - mb_width].mode == MODE_INTRA ||
139                   pMBs[index - 1 - mb_width].mode == MODE_INTRA_Q)) {                   pMBs[index - 1 - mb_width].mode == MODE_INTRA_Q)) {
140    
# Line 247  Line 245 
245          int16_t *pCurrent = pMB->pred_values[block];          int16_t *pCurrent = pMB->pred_values[block];
246          uint32_t i;          uint32_t i;
247    
248            DPRINTF(DPRINTF_COEFF,"predictor[0] %i", predictors[0]);
249    
250          dct_codes[0] += predictors[0];  // dc prediction          dct_codes[0] += predictors[0];  // dc prediction
251          pCurrent[0] = dct_codes[0] * iDcScaler;          pCurrent[0] = dct_codes[0] * iDcScaler;
252    
# Line 254  Line 254 
254                  for (i = 1; i < 8; i++) {                  for (i = 1; i < 8; i++) {
255                          int level = dct_codes[i] + predictors[i];                          int level = dct_codes[i] + predictors[i];
256    
257                            DPRINTF(DPRINTF_COEFF,"predictor[%i] %i",i, predictors[i]);
258    
259                          dct_codes[i] = level;                          dct_codes[i] = level;
260                          pCurrent[i] = level;                          pCurrent[i] = level;
261                          pCurrent[i + 7] = dct_codes[i * 8];                          pCurrent[i + 7] = dct_codes[i * 8];
# Line 261  Line 263 
263          } else if (acpred_direction == 2) {          } else if (acpred_direction == 2) {
264                  for (i = 1; i < 8; i++) {                  for (i = 1; i < 8; i++) {
265                          int level = dct_codes[i * 8] + predictors[i];                          int level = dct_codes[i * 8] + predictors[i];
266                            DPRINTF(DPRINTF_COEFF,"predictor[%i] %i",i*8, predictors[i]);
267    
268                          dct_codes[i * 8] = level;                          dct_codes[i * 8] = level;
269                          pCurrent[i + 7] = level;                          pCurrent[i + 7] = level;
# Line 385  Line 388 
388                          iDcScaler = get_dc_scaler(iQuant, (j < 4) ? 1 : 0);                          iDcScaler = get_dc_scaler(iQuant, (j < 4) ? 1 : 0);
389    
390                          predict_acdc(frame->mbs, x, y, mb_width, j, &qcoeff[j * 64],                          predict_acdc(frame->mbs, x, y, mb_width, j, &qcoeff[j * 64],
391                                                   iQuant, iDcScaler, predictors[j], 0, 0);                                                   iQuant, iDcScaler, predictors[j], 0);
392    
393                          S += calc_acdc(pMB, j, &qcoeff[j * 64], iDcScaler, predictors[j]);                          S += calc_acdc(pMB, j, &qcoeff[j * 64], iDcScaler, predictors[j]);
394    

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

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