frame_superres: Refactor pre-encode frame size set

Before this commit set_frame_size decided on the frame size to use and
then set it. It has been changed to just take an arbitrary size to make
it more flexible.

The decision of what size to use has been moved to the new
set_scaled_size and existing av1_calculate_superres_size.

setup_frame_size implements the old logic of getting the scaled size,
then superres size, then setting the frame to use it.

This change will make post-encode upscaling possible using
set_frame_size since it can now be given a target resolution.

Change-Id: I2f0f20740a54f751bc9963f279d6bcfdfb2722c2
diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h
index d7941c6..737fe16 100644
--- a/av1/common/onyxc_int.h
+++ b/av1/common/onyxc_int.h
@@ -161,12 +161,6 @@
   int last_width;
   int last_height;
 
-#if CONFIG_FRAME_SUPERRES
-  // The numerator of the superres scale, the denominator is fixed
-  uint8_t superres_scale_numerator;
-  int superres_width, superres_height;
-#endif  // CONFIG_FRAME_SUPERRES
-
   // TODO(jkoleszar): this implies chroma ss right now, but could vary per
   // plane. Revisit as part of the future change to YV12_BUFFER_CONFIG to
   // support additional planes.
@@ -297,6 +291,10 @@
   InterpFilter interp_filter;
 
   loop_filter_info_n lf_info;
+#if CONFIG_FRAME_SUPERRES
+  // The numerator of the superres scale; the denominator is fixed.
+  uint8_t superres_scale_numerator;
+#endif  // CONFIG_FRAME_SUPERRES
 #if CONFIG_LOOP_RESTORATION
   RestorationInfo rst_info[MAX_MB_PLANE];
   RestorationInternal rst_internal;