summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_reconintra.c
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2013-05-08 16:17:09 -0700
committerJohn Koleszar <jkoleszar@google.com>2013-05-15 17:57:08 -0700
commit501ae3484c245738a12fc64a9ebb4d3c114fbf09 (patch)
tree9ba863f54641a8194611514f1dfbda105d7545bf /vp9/common/vp9_reconintra.c
parentda5054c5af4d8da16492f670ca023a334559021e (diff)
downloadlibvpx-501ae3484c245738a12fc64a9ebb4d3c114fbf09.tar
libvpx-501ae3484c245738a12fc64a9ebb4d3c114fbf09.tar.gz
libvpx-501ae3484c245738a12fc64a9ebb4d3c114fbf09.tar.bz2
libvpx-501ae3484c245738a12fc64a9ebb4d3c114fbf09.zip
Fix vp9_build_intra_predictors_sbuv_s for non-4:2:0
Remove an assumption about chroma size, and the number of planes. Change-Id: I286a7fac296ec334c6a8ad847f663f3adbb9f43e
Diffstat (limited to 'vp9/common/vp9_reconintra.c')
-rw-r--r--vp9/common/vp9_reconintra.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/vp9/common/vp9_reconintra.c b/vp9/common/vp9_reconintra.c
index 9e580c7f6..ea4805f33 100644
--- a/vp9/common/vp9_reconintra.c
+++ b/vp9/common/vp9_reconintra.c
@@ -378,19 +378,21 @@ void vp9_build_intra_predictors_sby_s(MACROBLOCKD *xd,
void vp9_build_intra_predictors_sbuv_s(MACROBLOCKD *xd,
BLOCK_SIZE_TYPE bsize) {
- const int bwl = b_width_log2(bsize), bw = 2 << bwl;
- const int bhl = b_height_log2(bsize), bh = 2 << bhl;
+ int p;
- vp9_build_intra_predictors(xd->plane[1].dst.buf, xd->plane[1].dst.stride,
- xd->plane[1].dst.buf, xd->plane[1].dst.stride,
- xd->mode_info_context->mbmi.uv_mode,
- bw, bh, xd->up_available,
- xd->left_available, 0 /*xd->right_available*/);
- vp9_build_intra_predictors(xd->plane[2].dst.buf, xd->plane[1].dst.stride,
- xd->plane[2].dst.buf, xd->plane[1].dst.stride,
- xd->mode_info_context->mbmi.uv_mode,
- bw, bh, xd->up_available,
- xd->left_available, 0 /*xd->right_available*/);
+ for (p = 1; p < MAX_MB_PLANE; p++) {
+ const struct macroblockd_plane* const pd = &xd->plane[p];
+ const int bwl = b_width_log2(bsize) - pd->subsampling_x;
+ const int bw = 4 << bwl;
+ const int bhl = b_height_log2(bsize) - pd->subsampling_y;
+ const int bh = 4 << bhl;
+
+ vp9_build_intra_predictors(pd->dst.buf, pd->dst.stride,
+ pd->dst.buf, pd->dst.stride,
+ xd->mode_info_context->mbmi.uv_mode,
+ bw, bh, xd->up_available,
+ xd->left_available, 0 /*xd->right_available*/);
+ }
}
void vp9_intra4x4_predict(MACROBLOCKD *xd,