anv/video: Read the right source for memcpy
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

I'm assuming this based off the `if` branch above, after reading the
code for bit that Coverity pointed out in that branch. It doesn't look
correct to start at the base pointer, which will be 0 initialized and
has 52 bits of zero padding, while the default values are 255.

Fixes: 314de7af06 ("anv: Initial support for VP9 decoding")
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38437>
This commit is contained in:
Dylan Baker 2025-11-13 13:44:24 -08:00
parent 26aba9dc9f
commit 0735551b08

View file

@ -1276,7 +1276,7 @@ vp9_prob_buf_update(struct anv_video_session *vid,
} else if (BITSET_TEST(vid->prob_tbl_set, 3)) {
VP9_CTX_DEFAULT(seg_tree_probs);
VP9_CTX_DEFAULT(seg_pred_probs);
memcpy(ptr + SEG_PROBS_OFFSET, &ctx,
memcpy(ptr + SEG_PROBS_OFFSET, (void *)&ctx.seg_tree_probs,
SEG_TREE_PROBS + PREDICTION_PROBS);
}