Bring palette back to nextgenv2
It was removed by the master branch merge. Change-Id: I4b2a524c9e052e41063359afcb4ba22bf78344cf
This commit is contained in:
@@ -1157,6 +1157,15 @@ static void rd_pick_sb_modes(VP10_COMP *cpi,
|
||||
p[i].eobs = ctx->eobs_pbuf[i][0];
|
||||
}
|
||||
|
||||
if (cm->current_video_frame == 0 && cm->allow_screen_content_tools) {
|
||||
for (i = 0; i < 2; ++i) {
|
||||
if (ctx->color_index_map[i] == 0) {
|
||||
CHECK_MEM_ERROR(cm, ctx->color_index_map[i],
|
||||
vpx_memalign(16, (ctx->num_4x4_blk << 4) *
|
||||
sizeof(*ctx->color_index_map[i])));
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 2; ++i)
|
||||
pd[i].color_index_map = ctx->color_index_map[i];
|
||||
|
||||
@@ -3276,6 +3285,16 @@ static void encode_superblock(VP10_COMP *cpi, ThreadData *td,
|
||||
if (output_enabled)
|
||||
sum_intra_stats(td->counts, mi, xd->above_mi, xd->left_mi,
|
||||
frame_is_intra_only(cm));
|
||||
|
||||
if (bsize >= BLOCK_8X8 && output_enabled) {
|
||||
if (mbmi->palette_mode_info.palette_size[0] > 0) {
|
||||
mbmi->palette_mode_info.palette_first_color_idx[0] =
|
||||
xd->plane[0].color_index_map[0];
|
||||
// TODO(huisu): this increases the use of token buffer. Needs stretch
|
||||
// test to verify.
|
||||
vp10_tokenize_palette_sb(td, bsize, 0, t);
|
||||
}
|
||||
}
|
||||
vp10_tokenize_sb(cpi, td, t, !output_enabled, VPXMAX(bsize, BLOCK_8X8));
|
||||
} else {
|
||||
int ref;
|
||||
|
||||
Reference in New Issue
Block a user