Don't dering skipped superblocks
No change in metrics
Change-Id: I0da09270d78c3caf78a32a3157f02c87f2232e3e
diff --git a/av1/common/dering.c b/av1/common/dering.c
index 7405fb5..725be2e 100644
--- a/av1/common/dering.c
+++ b/av1/common/dering.c
@@ -113,7 +113,7 @@
/* FIXME: This is a temporary hack that uses more conservative
deringing for chroma. */
if (pli) level = (level * 5 + 4) >> 3;
- if (sb_all_skip(cm, sbr * MAX_MIB_SIZE, sbc * MAX_MIB_SIZE)) level = 0;
+ if (sb_all_skip(cm, sbr * MAX_MIB_SIZE, sbc * MAX_MIB_SIZE)) continue;
threshold = level << coeff_shift;
od_dering(&OD_DERING_VTBL_C, dst, MAX_MIB_SIZE * bsize[pli],
&src[pli][sbr * stride * bsize[pli] * MAX_MIB_SIZE +
diff --git a/av1/encoder/pickdering.c b/av1/encoder/pickdering.c
index 726a4c1..952e36b 100644
--- a/av1/encoder/pickdering.c
+++ b/av1/encoder/pickdering.c
@@ -96,6 +96,7 @@
int16_t dst[MAX_MIB_SIZE * MAX_MIB_SIZE * 8 * 8];
nhb = AOMMIN(MAX_MIB_SIZE, cm->mi_cols - MAX_MIB_SIZE * sbc);
nvb = AOMMIN(MAX_MIB_SIZE, cm->mi_rows - MAX_MIB_SIZE * sbr);
+ if (sb_all_skip(cm, sbr * MAX_MIB_SIZE, sbc * MAX_MIB_SIZE)) continue;
for (level = 0; level < 64; level++) {
int cur_mse;
int threshold;
@@ -126,6 +127,7 @@
for (sbc = 0; sbc < nhsb; sbc++) {
int gi;
int best_mse = mse[nhsb * sbr + sbc][0];
+ if (sb_all_skip(cm, sbr * MAX_MIB_SIZE, sbc * MAX_MIB_SIZE)) continue;
for (gi = 1; gi < 4; gi++) {
level = compute_level_from_index(global_level, gi);
if (mse[nhsb * sbr + sbc][level] < best_mse) {
@@ -145,6 +147,7 @@
int gi;
int best_gi;
int best_mse = mse[nhsb * sbr + sbc][0];
+ if (sb_all_skip(cm, sbr * MAX_MIB_SIZE, sbc * MAX_MIB_SIZE)) continue;
best_gi = 0;
for (gi = 1; gi < DERING_REFINEMENT_LEVELS; gi++) {
level = compute_level_from_index(best_level, gi);