Commit 7ba600dc authored by JackyChen's avatar JackyChen Committed by Gerrit Code Review
Browse files

Merge "Fix a bug in VP9 denoiser."

parents 27db51c6 e30f7698
......@@ -145,11 +145,17 @@ static VP9_DENOISER_DECISION denoiser_filter(const uint8_t *sig, int sig_stride,
adj = delta;
}
if (diff > 0) {
// Diff positive means we made positive adjustment above
// (in first try/attempt), so now make negative adjustment to bring
// denoised signal down.
avg[c] = MAX(0, avg[c] - adj);
total_adj += adj;
total_adj -= adj;
} else {
// Diff negative means we made negative adjustment above
// (in first try/attempt), so now make positive adjustment to bring
// denoised signal up.
avg[c] = MIN(UINT8_MAX, avg[c] + adj);
total_adj -= adj;
total_adj += adj;
}
}
sig += sig_stride;
......
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