Bugfix for SUPERRES_QTHRESH mode.

Earlier, superres denominator of last frame was used to calculate
active_cq_level of current frame -- which affected superres denominator
calculation for this frame as well.

We avoid this by resetting superres denominator from previous frame before
computing the superres params for this frame.

Also, related const-correctness.

Change-Id: Ia59c81ad66f858b09fc190d931bd2442d4b30eed
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 545c5b3..4c0e13e 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -4349,7 +4349,8 @@
   return rsz;
 }
 
-static void setup_frame_size_from_params(AV1_COMP *cpi, size_params_type *rsz) {
+static void setup_frame_size_from_params(AV1_COMP *cpi,
+                                         const size_params_type *rsz) {
   int encode_width = rsz->resize_width;
   int encode_height = rsz->resize_height;
 
@@ -4363,7 +4364,9 @@
 }
 
 static void setup_frame_size(AV1_COMP *cpi) {
-  size_params_type rsz = av1_calculate_next_size_params(cpi);
+  // Reset superres params from previous frame.
+  cpi->common.superres_scale_denominator = SCALE_NUMERATOR;
+  const size_params_type rsz = av1_calculate_next_size_params(cpi);
   setup_frame_size_from_params(cpi, &rsz);
 }