Skip to content

vp9: fill the inter-prediction parameter block field by field (1.034x) - #10

Merged
tannevaled merged 2 commits into
mainfrom
params-nocopy
Nov 29, 2026
Merged

tannevaled merged 2 commits into
mainfrom
params-nocopy

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

perf annotate of reconstructVP9InterPredictBlock (v0.5.0, VP9 1 tile) put about 65 % of the function's samples (6 % of the clip) on the copy of the vp9InterPredictPlaneParams composite literal: the literal is built in a temporary with 8-byte stores, then copied with 16-byte loads, which cannot be forwarded from the stores. Filling a zeroed variable field by field removes the copy (three sites: the fast path, and the two whole-block generic paths).

Measured on fractal (Ryzen 9 7950X, core 11, load 1.1), six interleaved rounds against the v0.5.0 test binary: 5331 to 5156 us/frame (1.034x; a first run 1.037x). VP8 and the 4-tile clip are not touched by the change. The libvpx vectors pass (756 subtests, GOEXPERIMENT=simd and plain); -race runs in CI.

Refs #8

🤖 Generated with Claude Code

tannevaled and others added 2 commits November 29, 2026 19:20
perf annotate of reconstructVP9InterPredictBlock put 65 percent of its
samples on the copy of a composite literal (16-byte loads of 8-byte stores,
store-forwarding stall). Field stores into a zeroed variable remove it.
VP9 1 tile 5331 to 5156 us/frame on fractal, six interleaved rounds;
vectors 756 pass, simd and plain.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
FrameRefSignBias is built as one 32-bit word, and
readVP9InterBlockModeInfo writes mi.Mv directly instead of filling a
local array and copying it at the end.

Note: these files carry a generated-file header; a regeneration from
portgovpx must carry the same change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 723d9a8 into main Nov 29, 2026
14 checks passed
@tannevaled
tannevaled deleted the params-nocopy branch November 29, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant