]> granicus.if.org Git - libvpx/commitdiff
vp9_reconintra: specialize d153 4x4
authorJames Zern <jzern@google.com>
Sat, 30 May 2015 03:12:46 +0000 (20:12 -0700)
committerJames Zern <jzern@google.com>
Sat, 30 May 2015 20:27:50 +0000 (13:27 -0700)
based on webp's HD4()

Change-Id: Icba1e21ec4b8f5026dc92e49741a68b059c8b9b1

vp9/common/vp9_reconintra.c

index bea23972868f7582a2fef59788909412722ba264..de9ba43aedfe6931c66f68b948dd2503a63b185d 100644 (file)
@@ -519,6 +519,30 @@ static INLINE void d135_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
 }
 intra_pred_allsizes(d135)
 
+void vp9_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride,
+                              const uint8_t *above, const uint8_t *left) {
+  const int I = left[0];
+  const int J = left[1];
+  const int K = left[2];
+  const int L = left[3];
+  const int X = above[-1];
+  const int A = above[0];
+  const int B = above[1];
+  const int C = above[2];
+
+  DST(0, 0) = DST(2, 1) = AVG2(I, X);
+  DST(0, 1) = DST(2, 2) = AVG2(J, I);
+  DST(0, 2) = DST(2, 3) = AVG2(K, J);
+  DST(0, 3)             = AVG2(L, K);
+
+  DST(3, 0)             = AVG3(A, B, C);
+  DST(2, 0)             = AVG3(X, A, B);
+  DST(1, 0) = DST(3, 1) = AVG3(I, X, A);
+  DST(1, 1) = DST(3, 2) = AVG3(J, I, X);
+  DST(1, 2) = DST(3, 3) = AVG3(K, J, I);
+  DST(1, 3)             = AVG3(L, K, J);
+}
+
 static INLINE void d153_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
                                   const uint8_t *above, const uint8_t *left) {
   int r, c;
@@ -544,7 +568,7 @@ static INLINE void d153_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
     dst += stride;
   }
 }
-intra_pred_allsizes(d153)
+intra_pred_no_4x4(d153)
 
 static INLINE void v_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
                                const uint8_t *above, const uint8_t *left) {