diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c index e91d932bb7..38643c9a28 100644 --- a/libavcodec/j2kenc.c +++ b/libavcodec/j2kenc.c @@ -521,13 +521,13 @@ static void init_luts(void) mask = ~((1<> (NMSEDEC_BITS-2)&2) + 1; - lut_nmsedec_ref[i] = FFMAX((-2*i + (1<i_data[(comp->coord[0][1] - comp->coord[0][0]) * y + x] << NMSEDEC_FRACBITS; + *ptr++ = comp->i_data[(comp->coord[0][1] - comp->coord[0][0]) * y + x] * (1 << NMSEDEC_FRACBITS); } } } else{