qmat[qscale][j] = (int)((UINT64_C(1) << (QMAT_SHIFT-3)) /
qmat[qscale][j] = (int)((UINT64_C(1) << QMAT_SHIFT) /
static void convert_matrix(MpegEncContext *s, int (*qmat)[64], uint16_t (*qmat16)[64], uint16_t (*qmat16_bias)[64],                           const UINT16 *quant_matrix, int bias){    int qscale;    for(qscale=1; qscale<32; qscale++){        int i;        if (s->fdct == ff_jpeg_fdct_islow) {            for(i=0;i<64;i++) {                const int j= block_permute_op(i);                /* 16 <= qscale * quant_matrix[i] <= 7905 */                /* 19952         <= aanscales[i] * qscale * quant_matrix[i]           <= 249205026 */                /* (1<<36)/19952 >= (1<<36)/(aanscales[i] * qscale * quant_matrix[i]) >= (1<<36)/249205026 */                /* 3444240       >= (1<<36)/(aanscales[i] * qscale * quant_matrix[i]) >= 275 */                                qmat[qscale][j] = (int)((UINT64_C(1) << (QMAT_SHIFT-3)) /                                 (qscale * quant_matrix[j]));            }        } else if (s->fdct == fdct_ifast) {            for(i=0;i<64;i++) {                const int j= block_permute_op(i);                /* 16 <= qscale * quant_matrix[i] <= 7905 */                /* 19952         <= aanscales[i] * qscale * quant_matrix[i]           <= 249205026 */                /* (1<<36)/19952 >= (1<<36)/(aanscales[i] * qscale * quant_matrix[i]) >= (1<<36)/249205026 */                /* 3444240       >= (1<<36)/(aanscales[i] * qscale * quant_matrix[i]) >= 275 */                                qmat[qscale][j] = (int)((UINT64_C(1) << (QMAT_SHIFT + 11)) /                                 (aanscales[i] * qscale * quant_matrix[j]));            }        } else {            for(i=0;i<64;i++) {                /* We can safely suppose that 16 <= quant_matrix[i] <= 255                   So 16           <= qscale * quant_matrix[i]             <= 7905                   so (1<<19) / 16 >= (1<<19) / (qscale * quant_matrix[i]) >= (1<<19) / 7905                   so 32768        >= (1<<19) / (qscale * quant_matrix[i]) >= 67                */                qmat  [qscale][i] = (1 << QMAT_SHIFT_MMX) / (qscale * quant_matrix[i]);                qmat16[qscale][i] = (1 << QMAT_SHIFT_MMX) / (qscale * quant_matrix[block_permute_op(i)]);                if(qmat16[qscale][i]==0 || qmat16[qscale][i]==128*256) qmat16[qscale][i]=128*256-1;                qmat16_bias[qscale][i]= ROUNDED_DIV(bias<<(16-QUANT_BIAS_SHIFT), qmat16[qscale][i]);            }        }    }}