jpeg2000: Factor out band initialization