hevc: add irap checks
hevc: refactor pic_arrays and set_sps