Commit 1eb3b203 authored by Jean-Marc Valin's avatar Jean-Marc Valin Committed by Jean-Marc Valin

Avoid the "initial copy" in the deringing filter

No change in output

Change-Id: I313bde67e59835f88e3b2e6079b0df2d7ed1a903
parent 6dd5b196
......@@ -334,13 +334,6 @@ void od_dering(int16_t *y, int ystride, const od_dering_in *x, int xstride,
in[i * OD_FILT_BSTRIDE + j] = x[i * xstride + j];
}
}
/* Assume deringing filter is sparsely applied, so do one large copy rather
than small copies later if deringing is skipped. */
for (i = 0; i < nvb << bsize; i++) {
for (j = 0; j < nhb << bsize; j++) {
y[i * ystride + j] = in[i * OD_FILT_BSTRIDE + j];
}
}
if (pli == 0) {
for (bi = 0; bi < dering_count; bi++) {
by = bskip[bi][0];
......
......@@ -108,6 +108,13 @@ int av1_dering_search(YV12_BUFFER_CONFIG *frame, const YV12_BUFFER_CONFIG *ref,
int threshold;
level = compute_level_from_index(best_level, gi);
threshold = level << coeff_shift;
for (r = 0; r < bsize[0] * nvb; r++) {
for (c = 0; c < bsize[0] * nhb; c++) {
dst[r * MAX_MIB_SIZE * bsize[0] + c] =
src[(sbr * bsize[0] * MAX_MIB_SIZE + r) * stride +
sbc * bsize[0] * MAX_MIB_SIZE + c];
}
}
od_dering(dst, MAX_MIB_SIZE * bsize[0],
&src[sbr * stride * bsize[0] * MAX_MIB_SIZE +
sbc * bsize[0] * MAX_MIB_SIZE],
......
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