| 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); |
| 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); |
| 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); |