Skip to content

New oapv_dc_removed_had8x8_neon() implementation. - #267

Merged
cpncf merged 6 commits into
AcademySoftwareFoundation:mainfrom
lordnn:main
Aug 14, 2026
Merged

New oapv_dc_removed_had8x8_neon() implementation.#267
cpncf merged 6 commits into
AcademySoftwareFoundation:mainfrom
lordnn:main

Conversation

@lordnn

@lordnn lordnn commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Binary equality but 30% faster.

Signed-off-by: lordnn <lordnn@yahoo.com>
Signed-off-by: lordnn <lordnn@yahoo.com>
@kpchoi

kpchoi commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

The first pass runs in s16 with a gain of 8, so this kernel only matches the scalar oapv_dc_removed_had8x8() while max|sample| <= 4095; at 4096 they diverge. Same limit as the SSE and AVX kernels, so not a regression, but it is documented nowhere in the NEON file.

Please add a note for it in the same place oapv_dc_removed_had8x8_avx() has one — first thing in the function body, before int satd = 0;:

    /* first pass is register-wise on 128-bit s16 row vectors, so its values
       reach 8 * 4095 and only just fit in s16; the input is therefore limited
       to 12-bit samples. after a transpose the second pass runs register-wise
       on 128-bit s32 vectors, since its values can reach 64 * 4095 and do not
       fit in s16 */

lordnn added 3 commits August 12, 2026 22:35
Signed-off-by: lordnn <lordnn@yahoo.com>
Signed-off-by: lordnn <lordnn@yahoo.com>
Signed-off-by: lordnn <lordnn@yahoo.com>
@kpchoi

kpchoi commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

VADDVQ_S32 is down to a single call site now, so the macro no longer earns its keep. Please drop the definition at the top of the file and inline it — int satd = 0; in the function header can go with it:

    int satd = vaddvq_s32(satv);
    return (satd + 2) >> 2;

That is the last thing from me.

Signed-off-by: lordnn <lordnn@yahoo.com>

@cpncf cpncf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cpncf
cpncf merged commit 061f4d4 into AcademySoftwareFoundation:main Aug 14, 2026
9 checks passed
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.

3 participants