Repository navigation
svac3: AVX2 and NEON kernels for angular intra prediction and SAO - #9
Conversation
Angular intra modes that read one reference line (xySign < 0, 5.4.8.1.4.2) now predict a row (or a column, for xyAxis 1) at a time: every sample of it has the same fractional position, so the row is a 4-tap filter along the line, ipred_row. The reference lines are padded with their last sample out to what the steepest mode reaches, which is what rr() and cc() clamp to. Modes that switch between the two lines within a row stay per sample. SAO now works on whole regions: band offset with a 32-entry table, edge offset with the class sign(c - a) + sign(c - b) looked up in a 5-entry one, over the region whose neighbours lie in the picture (the samples outside it are left as they are, as before). AVX2 uses pshufb for the tables, NEON tbl. test_dsp covers both: every MIPF filter and offset, widths that fall back to C, extreme samples; every edge direction and band table, on smooth and noisy content.
PR Summary by QodoAdd AVX2 and NEON kernels for angular prediction and SAO
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR |
The follow-up to #8: the two kernels it left out, intra prediction and SAO. Bit-exact like the rest: every SIMD kernel gives the C reference's output bits.
Angular intra prediction
xySign < 0), every sample of a row (xyAxis0), or of a column (xyAxis1), has the same fractional position and the same integer shift.ipred_rowkernel, with 32-bit sums. Columns are computed as rows and transposed.int16_tand padded with their last sample, so the kernel never clamps. The padding is exactly whatrr()/cc()return past 2M / 2N. It reaches as far as the steepest mode goes from a 64-sample block: 176 samples past it, checked againstsvac3_dir_tab.xySign > 0) stay per sample.SAO
pshufbhalves on AVX2,tblwith two registers on NEON.Checks
test_dsp(6 kernel groups now) covers:Speed: one core, best of 5,
master(with #8) against this branch:The x86 host is shared and was loaded, so its numbers are the noisier ones. After this, the high-bitrate stream is bound by the entropy decoder (
parse_srcc_block,decide), which is serial.