Repository navigation
Add NEON for avm_highbd_quantize_b - #5614
Merged
urvangjoshi merged 2 commits intoOct 24, 2026
Merged
urvangjoshi merged 2 commits into
urvangjoshi merged 2 commits into
Conversation
jjustiss-apple
commented
Oct 23, 2026
jjustiss-apple
commented
Oct 23, 2026
jianj-g
reviewed
Oct 23, 2026
Contributor
Author
|
@jianj-g All addressed, thank you for the review! |
jianj-g
approved these changes
Oct 23, 2026
- horizontal_max_s16x8: use vmaxvq_s16 on aarch64, keeping the vpmax chain for armv7. - quantize_b_large_neon: take the rounded AC zbin and round values from the caller instead of recomputing them. - Mark the all-below-zbin branch LIKELY so GCC does not schedule the quantize multiplies before it. - QuantizeBBoundTest: drop the diagnostic printfs and the stats that only fed them; the bit depth goes in the failure messages instead.
urvangjoshi
force-pushed
the
jjustiss/neon-highbd-quantize-b
branch
from
October 24, 2026 01:09
f19e0a0 to
1fee95d
Compare
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.
Adds NEON for avm_highbd_quantize_b (avm_dsp/arm/highbd_quantize_neon.c),
which fuses the quant and quant_shift steps into one multiply, with unit
tests.
QuantizeBTest compares the C, NEON, SSE2 and AVX2 versions over every TX
size, scan order and quantizer; QuantizeBBoundTest checks that the fused
multiply's intermediates and the dequant product fit in int32 for every
quantizer table entry.
Micro-benchmark, NEON vs C (Apple M4 Pro, P-core, 99% CI), on quantize_b
calls captured from A5 RA encodes:
CTC (RA, 33 frames, A4+A5, ARM):
E2E: +0.03% encode time at cpu-used 6 (no measurable change; Apple M2
Ultra).
Tests: QuantizeTest, QuantizeBTest and QuantizeBBoundTest pass (2515
tests); bit-exact against C.