Commit abd4343a authored by Fergus Simpson's avatar Fergus Simpson Committed by Debargha Mukherjee

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
parent 536e5520
......@@ -91,7 +91,6 @@ void av1_superres_upscale(AV1_COMMON *cm, BufferPool *const pool);
static INLINE int av1_superres_unscaled(const AV1_COMMON *cm) {
return (cm->superres_scale_numerator == SUPERRES_SCALE_DENOMINATOR);
}
#endif // CONFIG_FRAME_SUPERRES
#ifdef __cplusplus
......
......@@ -3844,9 +3844,6 @@ static void superres_post_encode(AV1_COMP *cpi) {
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 @@ static void superres_post_encode(AV1_COMP *cpi) {
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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment