tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

cdef.h (1756B)


      1 #include "src/cpu.h"
      2 #include "src/cdef.h"
      3 
      4 extern void BF(dav1d_cdef_filter_block_4x4, rvv)(pixel *dst, const ptrdiff_t dst_stride,
      5                                    const pixel (*left)[2],
      6                                    const pixel *const top, const pixel *const bottom,
      7                                    const int pri_strength, const int sec_strength, const int dir,
      8                                    const int damping, const enum CdefEdgeFlags edges HIGHBD_DECL_SUFFIX);
      9 
     10 extern void BF(dav1d_cdef_filter_block_4x8, rvv)(pixel *dst, const ptrdiff_t dst_stride,
     11                                    const pixel (*left)[2],
     12                                    const pixel *const top, const pixel *const bottom,
     13                                    const int pri_strength, const int sec_strength, const int dir,
     14                                    const int damping, const enum CdefEdgeFlags edges HIGHBD_DECL_SUFFIX);
     15 
     16 extern void BF(dav1d_cdef_filter_block_8x8, rvv)(pixel *dst, const ptrdiff_t dst_stride,
     17                                    const pixel (*left)[2],
     18                                    const pixel *const top, const pixel *const bottom,
     19                                    const int pri_strength, const int sec_strength, const int dir,
     20                                    const int damping, const enum CdefEdgeFlags edges HIGHBD_DECL_SUFFIX);
     21 
     22 
     23 static ALWAYS_INLINE void cdef_dsp_init_riscv(Dav1dCdefDSPContext *const c) {
     24    const unsigned flags = dav1d_get_cpu_flags();
     25    if (!(flags & DAV1D_RISCV_CPU_FLAG_V)) return;
     26 
     27    // c->dir = BF(dav1d_cdef_dir, rvv);
     28    c->fb[0] = BF(dav1d_cdef_filter_block_8x8, rvv);
     29    c->fb[1] = BF(dav1d_cdef_filter_block_4x8, rvv);
     30    c->fb[2] = BF(dav1d_cdef_filter_block_4x4, rvv);
     31 }