Fix 2x2 d45 intra prediction
This commit fixes the 2x2 d45 intra prediction. It avoids the use
of out-of-boundary position as reference. This resolves an enc/dec
mismatch issue in cb4x4 mode.
Change-Id: I93d01536a0c004190cc9fe3c724bf41364f6fdde
diff --git a/aom_dsp/intrapred.c b/aom_dsp/intrapred.c
index 04da185..8bc21fe 100644
--- a/aom_dsp/intrapred.c
+++ b/aom_dsp/intrapred.c
@@ -495,12 +495,11 @@
const int B = above[1];
const int C = above[2];
const int D = above[3];
- const int E = above[4];
(void)stride;
(void)left;
DST(0, 0) = AVG3(A, B, C);
DST(1, 0) = DST(0, 1) = AVG3(B, C, D);
- DST(1, 1) = AVG3(C, D, E);
+ DST(1, 1) = AVG3(C, D, D);
}
void aom_d45e_predictor_2x2_c(uint8_t *dst, ptrdiff_t stride,
@@ -509,12 +508,12 @@
const int B = above[1];
const int C = above[2];
const int D = above[3];
- const int E = above[4];
(void)stride;
(void)left;
+
DST(0, 0) = AVG3(A, B, C);
DST(1, 0) = DST(0, 1) = AVG3(B, C, D);
- DST(1, 1) = AVG3(C, D, E);
+ DST(1, 1) = AVG3(C, D, D);
}
void aom_d117_predictor_2x2_c(uint8_t *dst, ptrdiff_t stride,