Fix palette expt asan failure

Account for 422 video format.

Change-Id: Ic5af661720fc5fa7142210d907dd25e1e79ff653
This commit is contained in:
hui su 2015-04-16 11:18:58 -07:00
parent 871c51b30a
commit 8c00c7a9cd
2 changed files with 4 additions and 4 deletions

View File

@ -1394,9 +1394,9 @@ void vp9_predict_intra_block(const MACROBLOCKD *xd, int block_idx, int bwl_in,
int r, c; int r, c;
uint8_t *map = NULL; uint8_t *map = NULL;
if (xd->plane[1].subsampling_x && xd->plane[1].subsampling_y) if (xd->plane[1].subsampling_x || xd->plane[1].subsampling_y)
map = xd->plane[plane != 0].color_index_map; map = xd->plane[plane != 0].color_index_map;
else if (!xd->plane[1].subsampling_x && !xd->plane[1].subsampling_y) else
map = xd->plane[0].color_index_map; map = xd->plane[0].color_index_map;
for (r = 0; r < bs; r++) { for (r = 0; r < bs; r++) {

View File

@ -2459,7 +2459,7 @@ static int64_t rd_pick_intra_sbuv_mode(VP9_COMP *cpi, MACROBLOCK *x,
#if CONFIG_PALETTE #if CONFIG_PALETTE
if (xd->mi[0].src_mi->mbmi.sb_type >= BLOCK_8X8 && if (xd->mi[0].src_mi->mbmi.sb_type >= BLOCK_8X8 &&
xd->plane[1].subsampling_x && xd->plane[1].subsampling_y && (xd->plane[1].subsampling_x || xd->plane[1].subsampling_y) &&
cpi->common.allow_palette_mode) { cpi->common.allow_palette_mode) {
int colors_u = vp9_count_colors(src_u, src_stride, rows, cols); int colors_u = vp9_count_colors(src_u, src_stride, rows, cols);
int colors_v = vp9_count_colors(src_v, src_stride, rows, cols); int colors_v = vp9_count_colors(src_v, src_stride, rows, cols);