static void tree2tok(struct vp9_token *const p, vp9_tree t, int i, int v, int l) { v += v; ++l; do { const vp9_tree_index j = t[i++]; if (j <= 0) { p[-j].value = v; p[-j].len = l; } else { tree2tok(p, t, j, v, l); } } while (++v & 1); }
static void tree2tok( struct vp9_token_struct *const p, vp9_tree t, int i, int v, int L ) { v += v; ++L; do { const vp9_tree_index j = t[i++]; if (j <= 0) { p[-j].value = v; p[-j].Len = L; } else tree2tok(p, t, j, v, L); } while (++v & 1); }
void vp9_tokens_from_tree_offset(struct vp9_token_struct *p, vp9_tree t, int offset) { tree2tok(p - offset, t, 0, 0, 0); }
void vp9_tokens_from_tree(struct vp9_token_struct *p, vp9_tree t) { tree2tok(p, t, 0, 0, 0); }