[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.52, Tue Sep 13 12:12:15 2005 UTC revision 1.52.2.1, Wed Jun 27 18:57:42 2007 UTC
# Line 1067  Line 1067 
1067    
1068          do {          do {
1069                  level = get_coeff(bs, &run, &last, 1, 0);                  level = get_coeff(bs, &run, &last, 1, 0);
                 if (run == -1) {  
                         DPRINTF(XVID_DEBUG_ERROR,"fatal: invalid run");  
                         break;  
                 }  
1070                  coeff += run;                  coeff += run;
1071                    if ((run|coeff)&~63) {
1072  #ifdef _DEBUG                          DPRINTF(XVID_DEBUG_ERROR,"fatal: invalid run or index");
1073                  if(coeff>=64) {                          break;
                   DPRINTF(XVID_DEBUG_ERROR,"error: overflow in coefficient index\n");  
                   return;  
1074                  }                  }
 #endif  
1075    
1076                  block[scan[coeff]] = level;                  block[scan[coeff]] = level;
1077    
# Line 1115  Line 1108 
1108          p = 0;          p = 0;
1109          do {          do {
1110                  level = get_coeff(bs, &run, &last, 0, 0);                  level = get_coeff(bs, &run, &last, 0, 0);
                 if (run == -1) {  
                         DPRINTF(XVID_DEBUG_ERROR,"fatal: invalid run");  
                         break;  
                 }  
1111                  p += run;                  p += run;
1112                    if ((run|p)&~63) {
1113  #ifdef _DEBUG                          DPRINTF(XVID_DEBUG_ERROR,"fatal: invalid run or index");
1114                  if(p>=64)       {                          break;
                   DPRINTF(XVID_DEBUG_ERROR,"error: overflow in coefficient index\n");  
                   return;  
1115                  }                  }
 #endif  
1116    
1117                  if (level < 0) {                  if (level < 0) {
1118                          level = level*quant_m_2 - quant_add;                          level = level*quant_m_2 - quant_add;
# Line 1157  Line 1143 
1143          p = 0;          p = 0;
1144          do {          do {
1145                  level = get_coeff(bs, &run, &last, 0, 0);                  level = get_coeff(bs, &run, &last, 0, 0);
                 if (run == -1) {  
                         DPRINTF(XVID_DEBUG_ERROR,"fatal: invalid run");  
                         break;  
                 }  
1146                  p += run;                  p += run;
1147                    if ((run|p)&~63) {
1148  #ifdef _DEBUG                          DPRINTF(XVID_DEBUG_ERROR,"fatal: invalid run or index");
1149                  if(p>=64)       {                          break;
                   DPRINTF(XVID_DEBUG_ERROR,"error: overflow in coefficient index\n");  
                   return;  
1150                  }                  }
 #endif  
1151    
1152                  if (level < 0) {                  if (level < 0) {
1153                          level = ((2 * -level + 1) * matrix[scan[p]] * quant) >> 4;                          level = ((2 * -level + 1) * matrix[scan[p]] * quant) >> 4;

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

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