tor-browser

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

highbd_convolve_sve2.h (1705B)


      1 /*
      2 * Copyright (c) 2023, Alliance for Open Media. All rights reserved.
      3 *
      4 * This source code is subject to the terms of the BSD 2 Clause License and
      5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
      6 * was not distributed with this source code in the LICENSE file, you can
      7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
      8 * Media Patent License 1.0 was not distributed with this source code in the
      9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
     10 */
     11 
     12 #ifndef AOM_AV1_COMMON_ARM_HIGHBD_CONVOLVE_SVE2_H_
     13 #define AOM_AV1_COMMON_ARM_HIGHBD_CONVOLVE_SVE2_H_
     14 
     15 #include <arm_neon.h>
     16 
     17 #include "aom_dsp/arm/aom_neon_sve2_bridge.h"
     18 
     19 // clang-format off
     20 DECLARE_ALIGNED(16, static const uint16_t, kDotProdMergeBlockTbl[24]) = {
     21  // Shift left and insert new last column in transposed 4x4 block.
     22  1, 2, 3, 0, 5, 6, 7, 4,
     23  // Shift left and insert two new columns in transposed 4x4 block.
     24  2, 3, 0, 1, 6, 7, 4, 5,
     25  // Shift left and insert three new columns in transposed 4x4 block.
     26  3, 0, 1, 2, 7, 4, 5, 6,
     27 };
     28 // clang-format on
     29 
     30 static inline void aom_tbl2x4_s16(int16x8_t t0[4], int16x8_t t1[4],
     31                                  uint16x8_t tbl, int16x8_t res[4]) {
     32  res[0] = aom_tbl2_s16(t0[0], t1[0], tbl);
     33  res[1] = aom_tbl2_s16(t0[1], t1[1], tbl);
     34  res[2] = aom_tbl2_s16(t0[2], t1[2], tbl);
     35  res[3] = aom_tbl2_s16(t0[3], t1[3], tbl);
     36 }
     37 
     38 static inline void aom_tbl2x2_s16(int16x8_t t0[2], int16x8_t t1[2],
     39                                  uint16x8_t tbl, int16x8_t res[2]) {
     40  res[0] = aom_tbl2_s16(t0[0], t1[0], tbl);
     41  res[1] = aom_tbl2_s16(t0[1], t1[1], tbl);
     42 }
     43 
     44 #endif  // AOM_AV1_COMMON_ARM_HIGHBD_CONVOLVE_SVE2_H_