Revision f20886e4

View differences:

libavcodec/bink.c
1210 1210
 */
1211 1211
static av_cold void binkb_calc_quant()
1212 1212
{
1213
    uint8_t inv_bink_scan[64];
1213 1214
    double s[64];
1214 1215
    int i, j;
1215 1216

  
......
1228 1229
        }
1229 1230
    }
1230 1231

  
1232
    for (i = 0; i < 64; i++)
1233
        inv_bink_scan[bink_scan[i]] = i;
1234

  
1231 1235
    for (j = 0; j < 16; j++) {
1232 1236
        for (i = 0; i < 64; i++) {
1237
            int k = inv_bink_scan[i];
1233 1238
            if (s[i] == 1.0) {
1234
                binkb_intra_quant[j][i] = (1L << 12) * binkb_intra_seed[i] *
1239
                binkb_intra_quant[j][k] = (1L << 12) * binkb_intra_seed[i] *
1235 1240
                                          binkb_num[j]/binkb_den[j];
1236
                binkb_inter_quant[j][i] = (1L << 12) * binkb_inter_seed[i] *
1241
                binkb_inter_quant[j][k] = (1L << 12) * binkb_inter_seed[i] *
1237 1242
                                          binkb_num[j]/binkb_den[j];
1238 1243
            } else {
1239
                binkb_intra_quant[j][i] = (1L << 12) * binkb_intra_seed[i] * s[i] *
1244
                binkb_intra_quant[j][k] = (1L << 12) * binkb_intra_seed[i] * s[i] *
1240 1245
                                          binkb_num[j]/(double)binkb_den[j];
1241
                binkb_inter_quant[j][i] = (1L << 12) * binkb_inter_seed[i] * s[i] *
1246
                binkb_inter_quant[j][k] = (1L << 12) * binkb_inter_seed[i] * s[i] *
1242 1247
                                          binkb_num[j]/(double)binkb_den[j];
1243 1248
            }
1244 1249
        }

Also available in: Unified diff