Fix a bug in loop restoration switchable search This bug (introduced in 8af64ae) effectively turned off switchable search causing a drop in coding efficiency. Change-Id: I6db0cf48371638673fcf951158eef32a6db42545
diff --git a/av1/encoder/pickrst.c b/av1/encoder/pickrst.c index bffc92c..e7d1a1c 100644 --- a/av1/encoder/pickrst.c +++ b/av1/encoder/pickrst.c
@@ -1377,7 +1377,7 @@ swctxt->tile_cost[RESTORE_NONE][rtile_idx]); rsi->restoration_type[rtile_idx] = RESTORE_NONE; for (RestorationType r = 1; r < RESTORE_SWITCHABLE_TYPES; r++) { - if (force_restore_type != 0) + if (force_restore_type != RESTORE_TYPES) if (r != force_restore_type) continue; int tilebits = 0; if (swctxt->restore_types[r][rtile_idx] != r) continue; @@ -1402,7 +1402,7 @@ swctxt->wiener_info = rsi->wiener_info[rtile_idx]; else if (rsi->restoration_type[rtile_idx] == RESTORE_SGRPROJ) swctxt->sgrproj_info = rsi->sgrproj_info[rtile_idx]; - if (force_restore_type != 0) + if (force_restore_type != RESTORE_TYPES) assert(rsi->restoration_type[rtile_idx] == force_restore_type || rsi->restoration_type[rtile_idx] == RESTORE_NONE); swctxt->cost_switchable += best_cost;