From: hui su Date: Sat, 26 Mar 2016 00:28:15 +0000 (-0700) Subject: Fixes for Palette mode X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a128c2a729d2d4cc09c268350a68869f39fa945;p=libvpx Fixes for Palette mode This patch fixes 2 issues in Palette mode: 1. More memory is needed in PALETTE_BUFFER for 444 video format. 2. A merge issue caused by https://chromium-review.googlesource.com/#/c/333940/7 Change-Id: I2aedc7dfdfb6b66fbd600189ec6e1e2cc6120d40 --- diff --git a/vp10/decoder/decodeframe.c b/vp10/decoder/decodeframe.c index fb292fd75..8aa002700 100644 --- a/vp10/decoder/decodeframe.c +++ b/vp10/decoder/decodeframe.c @@ -1881,9 +1881,6 @@ static void decode_block(VP10Decoder *const pbi, MACROBLOCKD *const xd, (xd->mb_to_bottom_edge >= 0 ? 0 : xd->mb_to_bottom_edge >> (5 + pd->subsampling_y)); - if (plane <= 1 && mbmi->palette_mode_info.palette_size[plane]) - vp10_decode_palette_tokens(xd, plane, r); - for (row = 0; row < max_blocks_high; row += step) for (col = 0; col < max_blocks_wide; col += step) predict_and_reconstruct_intra_block(xd, diff --git a/vp10/encoder/block.h b/vp10/encoder/block.h index 295213ff2..582f3bc23 100644 --- a/vp10/encoder/block.h +++ b/vp10/encoder/block.h @@ -64,7 +64,7 @@ typedef struct { typedef struct { uint8_t best_palette_color_map[4096]; - double kmeans_data_buf[4096]; + double kmeans_data_buf[2 * 4096]; uint8_t kmeans_indices_buf[4096]; uint8_t kmeans_pre_indices_buf[4096]; } PALETTE_BUFFER;