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

Diff of /xvidcore/src/bitstream/mbcoding.c

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

revision 1.51, Mon Apr 4 23:49:37 2005 UTC revision 1.52, Tue Sep 13 12:12:15 2005 UTC
# Line 1072  Line 1072 
1072                          break;                          break;
1073                  }                  }
1074                  coeff += run;                  coeff += run;
1075    
1076    #ifdef _DEBUG
1077                    if(coeff>=64) {
1078                      DPRINTF(XVID_DEBUG_ERROR,"error: overflow in coefficient index\n");
1079                      return;
1080                    }
1081    #endif
1082    
1083                  block[scan[coeff]] = level;                  block[scan[coeff]] = level;
1084    
1085                  DPRINTF(XVID_DEBUG_COEFF,"block[%i] %i\n", scan[coeff], level);                  DPRINTF(XVID_DEBUG_COEFF,"block[%i] %i\n", scan[coeff], level);
# Line 1113  Line 1121 
1121                  }                  }
1122                  p += run;                  p += run;
1123    
1124    #ifdef _DEBUG
1125                    if(p>=64)       {
1126                      DPRINTF(XVID_DEBUG_ERROR,"error: overflow in coefficient index\n");
1127                      return;
1128                    }
1129    #endif
1130    
1131                  if (level < 0) {                  if (level < 0) {
1132                          level = level*quant_m_2 - quant_add;                          level = level*quant_m_2 - quant_add;
1133                          block[scan[p]] = (level >= -2048 ? level : -2048);                          block[scan[p]] = (level >= -2048 ? level : -2048);
# Line 1148  Line 1163 
1163                  }                  }
1164                  p += run;                  p += run;
1165    
1166    #ifdef _DEBUG
1167                    if(p>=64)       {
1168                      DPRINTF(XVID_DEBUG_ERROR,"error: overflow in coefficient index\n");
1169                      return;
1170                    }
1171    #endif
1172    
1173                  if (level < 0) {                  if (level < 0) {
1174                          level = ((2 * -level + 1) * matrix[scan[p]] * quant) >> 4;                          level = ((2 * -level + 1) * matrix[scan[p]] * quant) >> 4;
1175                          block[scan[p]] = (level <= 2048 ? -level : -2048);                          block[scan[p]] = (level <= 2048 ? -level : -2048);

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.52

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