Repository navigation
pixel: horizontal 8-tap convolution with VPMADDUBSW (VP9 +3.8%) - #3
Merged
Merged
Conversation
Take filterHorizMadd and filterHorizMadd8 from govpx 43f826d8 (BSD-3, attributed in the file header) for the step == 1 case of filterWide8 and filterNarrow8. Tap pairs multiply byte pairs with DotProductPairsSaturated, the instruction libvpx's vpx_filter_block1d*_h8 kernels use. maddPairs proves per tap set that no partial sum saturates except the last add, so the result is exactly clamp((sum+64)>>7, 0, 255); other tap sets fall back to the existing kernels. Add TestMaddKernelsAgainstScalar (regular, sharp, smooth, bilinear and 200 random tap sets, extremal inputs, sources cut exactly at the footprint), BenchmarkDecodeClip, and docs/perf/speed-log.md. crowd_run 1080p, fractal, one core, 6 interleaved rounds, median us/frame: VP9 1 tile 7210 -> 6944, VP9 4 tiles 7581 -> 7304, VP8 4969 -> 4961. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Horizontal 8-tap convolution with VPMADDUBSW for the
step == 1case offilterWide8/filterNarrow8, taken from govpx commit 43f826d8 (BSD-3, attributed in the file header). Exactness is proved per tap set (maddPairs); other tap sets fall back to the existing kernels.crowd_run 1080p, 300 frames, fractal (Ryzen 9 7950X), one pinned core, 6 interleaved rounds against v0.1.0, load under 3, median us/frame:
libvpx single core is 2623 / 2610 / 2427, so the gap stays about 2.6x (VP9) and 2.0x (VP8). The libvpx per-stage column cannot be produced (stripped symbols), so only totals are compared.
Also adds
BenchmarkDecodeClip(setVPX_BENCH_FILES),TestMaddKernelsAgainstScalar(libvpx tap tables plus 200 random tap sets, extremal inputs, sources cut exactly at the footprint), anddocs/perf/speed-log.md, which records what was tried and not kept (VP8 six-tap through the same kernel: slower; vertical VPMADDUBSW: archsimd on amd64 has no byte interleave) and what is not done (F1, loop filter, move into go-videodsp/kernels).Vector suite and the vet matrix (22 configurations) are left to CI; the madd test passes on fractal.
🤖 Generated with Claude Code