avcodec/jpeg2000: change flags array type to 16bit