avcodec/jpeg2000: Check that codsty->log2_prec_widths/heights has been initialized