google / android-riscv64

Issues and discussions around RISC-V support in AOSP.
Apache License 2.0
208 stars 15 forks source link

external/libaom: optimization #66

Open prashanthswami opened 1 year ago

prashanthswami commented 1 year ago

The x86/ARM architectures make use of SSSE3 and NEON for the codec support in this library. We probably will need some optimization work done to meet parity.

mr-c commented 11 months ago

FYI: optimized riscv64 vector implementations of NEON intrinsics are coming to SIMDe: https://doi.org/10.48550/arXiv.2309.16509 https://github.com/simd-everywhere/simde/issues/1087

(SIMDe already provides portable implementations of SSSE3 (and almost all of NEON) which compile and work on riscv64 with GCC or clang)

Obviously hand-optimized RVV 1.0 intrinsics would be better, but this can be a stopgap.

prashanthswami commented 7 months ago

We should probably reach out to the libaom team and kick-start the long-term plan. At the moment, I don't know of anyone who needs this urgently enough that we need to implement a stopgap.

At a glance, it looks like we'll have to do a few operations:

  1. We'll have to update libyuv in the aom repository, it's version is old and doesn't contain the RVV intrinsics.
  2. We'll have to create equivalent files for aom_dsp/arm by implementing intrinsics for RVV. This is about 60 files to rewrite.