frame_superres: Fix bad assert
Commit 12311 had a misplaced assert set that was causing superres debug
runs to fail. The asserts just needed to be moved to where they were
relevant to fix the issue.
Change-Id: Ic370686c7156fcaf9380d8d8fd9d35b892d77e46
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index e9a27a9..30938ba 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -3844,9 +3844,6 @@
if (av1_superres_unscaled(cm)) return;
- assert(cpi->unscaled_source->y_crop_width != cm->superres_upscaled_width);
- assert(cpi->unscaled_source->y_crop_height != cm->superres_upscaled_height);
-
av1_superres_upscale(cm, NULL);
// If regular resizing is occurring the source will need to be downscaled to
@@ -3856,6 +3853,8 @@
cpi->source = cpi->unscaled_source;
if (cpi->last_source != NULL) cpi->last_source = cpi->unscaled_last_source;
} else {
+ assert(cpi->unscaled_source->y_crop_width != cm->superres_upscaled_width);
+ assert(cpi->unscaled_source->y_crop_height != cm->superres_upscaled_height);
// Do downscale. cm->(width|height) has been updated by av1_superres_upscale
if (aom_realloc_frame_buffer(
&cpi->scaled_source, cm->superres_upscaled_width,