Commit 48d3e633 authored by Urvang Joshi's avatar Urvang Joshi

joint_motion_search: Make assumption explicit.

Use assert to test the assumption noted in the comment.

Ran some encodes with varying per-frame resolutions (using
SUPERRES_RANDOM and RESIZE_RANDOM modes) to ensure that these
asserts are indeed valid.

Change-Id: I30021fff05f9793f80e42c5319bed02b0ae04cbd
parent 10fea49b
......@@ -5641,6 +5641,12 @@ static void joint_motion_search(const AV1_COMP *cpi, MACROBLOCK *x,
// Since we have scaled the reference frames to match the size of the current
// frame we must use a unit scaling factor during mode selection.
assert(IMPLIES(scaled_ref_frame[0] != NULL,
cm->width == scaled_ref_frame[0]->y_crop_width &&
cm->height == scaled_ref_frame[0]->y_crop_height));
assert(IMPLIES(scaled_ref_frame[1] != NULL,
cm->width == scaled_ref_frame[1]->y_crop_width &&
cm->height == scaled_ref_frame[1]->y_crop_height));
av1_setup_scale_factors_for_frame(&sf, cm->width, cm->height, cm->width,
cm->height, cm->use_highbitdepth);
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