Fix rounding bug and off-by-one bug for resize scripts of test samples.

Change-Id: I334d3a6dd44f35554d60c21d54ba74f0478570ff
3 files changed