avcodec/j2kenc: Fix out of array access in encode_cblk()