From e388251d5d3739ed5d5154c7fd108a9a1403c578 Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Thu, 25 Apr 2013 17:52:09 -0700 Subject: [PATCH] Enabled i4x4 to use right above pixels Change-Id: I7442b4600b6812bed13e655ccf68f9ea56cc83a2 --- vp9/common/vp9_reconintra.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vp9/common/vp9_reconintra.c b/vp9/common/vp9_reconintra.c index 93bb98e..e7a711e 100644 --- a/vp9/common/vp9_reconintra.c +++ b/vp9/common/vp9_reconintra.c @@ -236,7 +236,10 @@ void vp9_build_intra_predictors(uint8_t *src, int src_stride, if (up_available) { uint8_t *yabove_ptr = src - src_stride; vpx_memcpy(yabove_row, yabove_ptr, bw); - vpx_memset(yabove_row + bw, yabove_row[bw -1], bw); + if (bw == 4 && right_available) + vpx_memcpy(yabove_row + bw, yabove_ptr + bw, bw); + else + vpx_memset(yabove_row + bw, yabove_row[bw -1], bw); ytop_left = left_available ? yabove_ptr[-1] : 127; } else { vpx_memset(yabove_row, 127, bw * 2); @@ -610,7 +613,7 @@ void vp9_intra4x4_predict(MACROBLOCKD *xd, uint8_t *predictor, int pre_stride) { const int have_top = (block_idx >> 2) || xd->up_available; const int have_left = (block_idx & 3) || xd->left_available; - const int have_right = ((block_idx & 3) != 3) || xd->right_available; + const int have_right = ((block_idx & 3) != 3); vp9_build_intra_predictors(predictor, pre_stride, predictor, pre_stride, @@ -625,7 +628,7 @@ void vp9_intra_uv4x4_predict(MACROBLOCKD *xd, const int block_idx = block4x4_idx & 3; const int have_top = (block_idx >> 1) || xd->up_available; const int have_left = (block_idx & 1) || xd->left_available; - const int have_right = !(block_idx & 1) || xd->right_available; + const int have_right = !(block_idx & 1); vp9_build_intra_predictors(predictor, pre_stride, predictor, pre_stride, -- 2.7.4