* the dequantization phase */
for (i = 1; i < 64; i++) {
- j = zigzag_index[i];
+ j = i;
s->intra_y_dequant[j] = s->coded_intra_y_dequant[i] * ac_scale_factor / 100;
if (s->intra_y_dequant[j] < MIN_DEQUANT_VAL)
if (!eob_run) {
fragment->coeff_count += zero_run;
if (fragment->coeff_count < 64)
- fragment->coeffs[fragment->coeff_count++] = coeff;
+ fragment->coeffs[dezigzag_index[fragment->coeff_count++]] = coeff;
debug_vlc(" fragment %d coeff = %d\n",
s->coded_fragment_list[i], fragment->coeffs[coeff_index]);
} else {
int32_t t1, t2;
int i, j;
-
+
/* de-zigzag and dequantize */
for (i = 0; i < coeff_count; i++) {
- j = dezigzag_index[i];
- dequantized_data[j] = dequant_matrix[i] * input_data[i];
+ dequantized_data[i] = dequant_matrix[i] * input_data[i];
}
/* Inverse DCT on the rows now */