diff options
author | John Koleszar <jkoleszar@google.com> | 2013-02-21 10:38:27 -0800 |
---|---|---|
committer | John Koleszar <jkoleszar@google.com> | 2013-02-27 08:22:40 -0800 |
commit | b683eecf6dfe9fc947394df6f0e047e2fcbea43e (patch) | |
tree | 7be57a88e8df2995af3f5968db09e492b1a46073 /vp9/encoder/vp9_onyx_if.c | |
parent | 6fd7dd1a703b922a5f200c4e1962be5b81c73af0 (diff) | |
download | libvpx-b683eecf6dfe9fc947394df6f0e047e2fcbea43e.tar libvpx-b683eecf6dfe9fc947394df6f0e047e2fcbea43e.tar.gz libvpx-b683eecf6dfe9fc947394df6f0e047e2fcbea43e.tar.bz2 libvpx-b683eecf6dfe9fc947394df6f0e047e2fcbea43e.zip |
Test upscaling as well as downscaling
Fixes a bug in vp9_set_internal_size() that prevented returning to
the unscaled state. Updated the ResizeInternalTest to scale both
down and up. Added a check that all frames are within 2.5% of the
quality of the initial keyframe.
Change-Id: I3b7ef17cdac144ed05b9148dce6badfa75cff5c8
Diffstat (limited to 'vp9/encoder/vp9_onyx_if.c')
-rw-r--r-- | vp9/encoder/vp9_onyx_if.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index 1fec0cc1d..45ab6cd8c 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -4123,20 +4123,19 @@ int vp9_set_internal_size(VP9_PTR comp, VP9_COMP *cpi = (VP9_COMP *) comp; VP9_COMMON *cm = &cpi->common; - if (horiz_mode <= ONETWO) - cm->horiz_scale = horiz_mode; - else + if (horiz_mode > ONETWO) return -1; - if (vert_mode <= ONETWO) - cm->vert_scale = vert_mode; - else + if (vert_mode > ONETWO) return -1; - if (cm->horiz_scale != NORMAL || cm->vert_scale != NORMAL) { + if (cm->horiz_scale != horiz_mode || cm->vert_scale != vert_mode) { int UNINITIALIZED_IS_SAFE(hr), UNINITIALIZED_IS_SAFE(hs); int UNINITIALIZED_IS_SAFE(vr), UNINITIALIZED_IS_SAFE(vs); + cm->horiz_scale = horiz_mode; + cm->vert_scale = vert_mode; + Scale2Ratio(cm->horiz_scale, &hr, &hs); Scale2Ratio(cm->vert_scale, &vr, &vs); |