summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2015-06-04 19:17:30 -0700
committerJames Zern <jzern@google.com>2015-06-04 20:11:53 -0700
commit60d0b3364cc2250d3077a8a5f0d9edd88f76a548 (patch)
tree8a4af5eda9e7d8cde7be317ec3b4eac45f2da8fe /vp9
parent7012ba63951388bc1b794c042f87f343c71bd65a (diff)
downloadlibvpx-60d0b3364cc2250d3077a8a5f0d9edd88f76a548.tar
libvpx-60d0b3364cc2250d3077a8a5f0d9edd88f76a548.tar.gz
libvpx-60d0b3364cc2250d3077a8a5f0d9edd88f76a548.tar.bz2
libvpx-60d0b3364cc2250d3077a8a5f0d9edd88f76a548.zip
vp9_reconintra/d45_predictor: remove temp storage
dst row 0 can be reused in the same way Change-Id: Id977da62545dcc4a89cebbcbad90ba84f8ff5d6b
Diffstat (limited to 'vp9')
-rw-r--r--vp9/common/vp9_reconintra.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/vp9/common/vp9_reconintra.c b/vp9/common/vp9_reconintra.c
index 3312f2977..650f4adde 100644
--- a/vp9/common/vp9_reconintra.c
+++ b/vp9/common/vp9_reconintra.c
@@ -464,15 +464,17 @@ void vp9_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride,
static INLINE void d45_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
const uint8_t *above, const uint8_t *left) {
const uint8_t above_right = above[bs - 1];
+ const uint8_t *const dst_row0 = dst;
int x, size;
- uint8_t avg[31]; // TODO(jzern): this could be block size specific
(void)left;
for (x = 0; x < bs - 1; ++x) {
- avg[x] = AVG3(above[x], above[x + 1], above[x + 2]);
+ dst[x] = AVG3(above[x], above[x + 1], above[x + 2]);
}
- for (x = 0, size = bs - 1; x < bs; ++x, --size) {
- memcpy(dst, avg + x, size);
+ dst[bs - 1] = above_right;
+ dst += stride;
+ for (x = 1, size = bs - 2; x < bs; ++x, --size) {
+ memcpy(dst, dst_row0 + x, size);
memset(dst + size, above_right, x + 1);
dst += stride;
}