Repository navigation
Add NEON for av2_trellis_loop_diagonal_st8 - #5489
urvangjoshi merged 3 commits into
Conversation
5ff0cbf to
61d364d
Compare
|
@jianj-g I addressed all your comments, except the aarch64/armv8a instruction question which I'd like to get clarification on from @yunqingwang1 before incorporating that change. It seems that using annotated disassembly can catch some of these (like the a0_0 a0_1 issue) where the compiler found the reduction but I missed the simplification in source code. Incorporating a new RTCD class for aarch64/armv8a would likely be overbearing as 99% of the code would be shared with armv7a, but would we be open to using pragmas to split the armv7a and aarch64 implementations? ARM builds seem to already lose the dynamic run-time RTCD features, so perhaps using pragmas isn't unreasonable. What do you think? |
|
@jianj-g from an email, it looks like @yunqingwang1 would prefer following the AV1-style of RTCD with multiple ARM/neon specializations. Since this one is armv7a compliant, how would you feel about tabling the armv8a optimizations until I can explore the multiple NEON specializations a bit more? |
Yeah that's fine. Currently it looks like armv7a vs aarch64 is a compile time flag: So it doesn't need additional RTCD. But aarch64 extentions would need that like (dotprod, i8mm, sve). Thanks for looking into this! |
…ate_eob lane, simplify decide_states loads
6a1eab5 to
d30bcc9
Compare
Full ARMv7-A NEON port of the TCQ trellis diagonal loop. Fuses all
sub-kernels (pre_quant, rate_dist, decide_states, update_states,
update_nbr_diagonal) into a single inlined loop, vectorizing quantization,
RD-cost computation, context extraction, and state update with NEON
intrinsics. The decide_states path remains scalar (no vcgtq_s64 on ARMv7)
but uses ccmp chains for efficient 3-way branching.
Also consolidates duplicated helpers (kGolombExp0Bits, get_dqv,
get_diag_ctx) from NEON/AVX2/C into trellis_quant.h.
CTC results (RA, cpu-used=1, 33 frames, A4+A5):
Micro-benchmarks (Apple Silicon M2 Ultra, total_us/coeffs, 100M iterations):
Unit tests included (RandomValues + Speed).