A reversibility-gain model for integer Karhunen-Loève transform design in video coding