Commit e388251d authored by Yaowu Xu's avatar Yaowu Xu
Browse files

Enabled i4x4 to use right above pixels

Change-Id: I7442b4600b6812bed13e655ccf68f9ea56cc83a2
parent 3d655805
...@@ -236,7 +236,10 @@ void vp9_build_intra_predictors(uint8_t *src, int src_stride, ...@@ -236,7 +236,10 @@ void vp9_build_intra_predictors(uint8_t *src, int src_stride,
if (up_available) { if (up_available) {
uint8_t *yabove_ptr = src - src_stride; uint8_t *yabove_ptr = src - src_stride;
vpx_memcpy(yabove_row, yabove_ptr, bw); 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; ytop_left = left_available ? yabove_ptr[-1] : 127;
} else { } else {
vpx_memset(yabove_row, 127, bw * 2); vpx_memset(yabove_row, 127, bw * 2);
...@@ -610,7 +613,7 @@ void vp9_intra4x4_predict(MACROBLOCKD *xd, ...@@ -610,7 +613,7 @@ void vp9_intra4x4_predict(MACROBLOCKD *xd,
uint8_t *predictor, int pre_stride) { uint8_t *predictor, int pre_stride) {
const int have_top = (block_idx >> 2) || xd->up_available; const int have_top = (block_idx >> 2) || xd->up_available;
const int have_left = (block_idx & 3) || xd->left_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, vp9_build_intra_predictors(predictor, pre_stride,
predictor, pre_stride, predictor, pre_stride,
...@@ -625,7 +628,7 @@ void vp9_intra_uv4x4_predict(MACROBLOCKD *xd, ...@@ -625,7 +628,7 @@ void vp9_intra_uv4x4_predict(MACROBLOCKD *xd,
const int block_idx = block4x4_idx & 3; const int block_idx = block4x4_idx & 3;
const int have_top = (block_idx >> 1) || xd->up_available; const int have_top = (block_idx >> 1) || xd->up_available;
const int have_left = (block_idx & 1) || xd->left_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, vp9_build_intra_predictors(predictor, pre_stride,
predictor, pre_stride, predictor, pre_stride,
......
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