encode

2k-long re-mapping pairs: [in0_lo, in0_hi, in1_lo, in1_hi, …].