avcodec/h264_slice: Simplify ref2frm indexing