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/common/resize.h b/av1/common/resize.h
index e67b7fe..7bfbfcc 100644
--- a/av1/common/resize.h
+++ b/av1/common/resize.h
@@ -91,7 +91,6 @@
static INLINE int av1_superres_unscaled(const AV1_COMMON *cm) {
return (cm->superres_scale_numerator == SUPERRES_SCALE_DENOMINATOR);
}
-
#endif // CONFIG_FRAME_SUPERRES
#ifdef __cplusplus
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,