Commit 13648e75 authored by Jingning Han's avatar Jingning Han

Fix tokenization process in palette when lv-map is on

This commit resolves an encoding failure issue due to the
tokenization in palette when the lv-map experiment is turned on.

BUG=aomedia:689

Change-Id: I8e476ae81e4d5d11c6aab7611dff9deb7fa63e9e
parent 6692a10e
......@@ -2529,7 +2529,9 @@ static void write_tokens_b(AV1_COMP *cpi, const TileInfo *const tile,
&cols);
assert(*tok < tok_end);
pack_palette_tokens(w, tok, palette_size_plane, rows * cols);
#if !CONFIG_LV_MAP
assert(*tok < tok_end + mbmi->skip);
#endif // !CONFIG_LV_MAP
}
}
......@@ -2618,7 +2620,9 @@ static void write_tokens_b(AV1_COMP *cpi, const TileInfo *const tile,
if (!is_chroma_reference(mi_row, mi_col, mbmi->sb_type,
xd->plane[plane].subsampling_x,
xd->plane[plane].subsampling_y)) {
#if !CONFIG_LV_MAP
(*tok)++;
#endif // !CONFIG_LV_MAP
continue;
}
#endif
......
......@@ -694,7 +694,7 @@ void av1_tokenize_sb_vartx(const AV1_COMP *cpi, ThreadData *td, TOKENEXTRA **t,
if (!is_chroma_reference(mi_row, mi_col, bsize,
xd->plane[plane].subsampling_x,
xd->plane[plane].subsampling_y)) {
#if !CONFIG_PVQ || !CONFIG_LV_MAP
#if !CONFIG_PVQ && !CONFIG_LV_MAP
if (!dry_run) {
(*t)->token = EOSB_TOKEN;
(*t)++;
......
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