Rate and distortion stats were not correctly recorded. Change-Id: I91829d66b42e7b7b5b8bf37a0c1c43d6b8206a9f