j2kdec: merge picture handling from jpeg2000