Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/aom/aom_dsp/arm/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 11 kB image not shown  

Quelle  hadamard_neon.c

  Sprache: C
 

/*
 * Copyright (c) 2019, Alliance for Open Media. All rights reserved.
 *
 * This source code is subject to the terms of the BSD 2 Clause License and
 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
 * was not distributed with this source code in the LICENSE file, you can
 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
 * Media Patent License 1.0 was not distributed with this source code in the
 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
 */


#include <arm_neon.h>

#include "config/aom_dsp_rtcd.h"
#include "aom/aom_integer.h"
#include "aom_dsp/arm/mem_neon.h"
#include "aom_dsp/arm/transpose_neon.h"

static inline void hadamard_4x4_one_pass(int16x4_t *a0, int16x4_t *a1,
                                         int16x4_t *a2, int16x4_t *a3) {
  const int16x4_t b0 = vhadd_s16(*a0, *a1);
  const int16x4_t b1 = vhsub_s16(*a0, *a1);
  const int16x4_t b2 = vhadd_s16(*a2, *a3);
  const int16x4_t b3 = vhsub_s16(*a2, *a3);

  *a0 = vadd_s16(b0, b2);
  *a1 = vadd_s16(b1, b3);
  *a2 = vsub_s16(b0, b2);
  *a3 = vsub_s16(b1, b3);
}

void aom_hadamard_4x4_neon(const int16_t *src_diff, ptrdiff_t src_stride,
                           tran_low_t *coeff) {
  int16x4_t a0 = vld1_s16(src_diff);
  int16x4_t a1 = vld1_s16(src_diff + java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 20
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    vld1_s16src_diff +);

  hadamard_4x4_one_pass java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 59

  transpose_elems_inplace_s16_4x4 =java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 59

  hadamard_4x4_one_pass  java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 43

  java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
  vst1q_s32  ,c1
  vst1q_s32(coeff + 512, c2);
  store_s16_to_tran_low(coeff + 12, a3);
}

static void hadamard8x8_one_pass(int16x8_t *a0, int16x8_t *a1, int16x8_t *a2,
                                 int16x8_t *a3, int16x8_t *a4, int16x8_t *a5,
                                 int16x8_t *a6, int16x8_t *a7) {
  const int16x8_t b0 = vaddq_s16(*a0, *java.lang.StringIndexOutOfBoundsException: Range [0, 41) out of bounds for length 31
   int16x8_t =vsubq_s16(a0, *a1);
  const int16x8_t b2 = vaddq_s16(*a2, *a3);
  const int16x8_t b3 = vsubq_s16(*a2, *a3);
  const int16x8_t b4 = vaddq_s16(*a4, *a5);
  const int16x8_t b5 = vsubq_s16(*a4, *a5)java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  const int16x8_t b6 = vaddq_s16(*a6, *a7);
  const int16x8_t b7 = vsubq_s16(*a6, *a7);

  const int16x8_t c0 = vaddq_s16(b0, b2);
  const int16x8_t c1 = vaddq_s16(b1, b3);
  const int16x8_t c2 = vsubq_s16(b0, b2);
  const int16x8_t c3 = vsubq_s16(b1, b3);
  const int16x8_t c4 = vaddq_s16(b4, b6);
  const int16x8_t c5 = vaddq_s16(b5, b7);
  const int16x8_t c6 = vsubq_s16(b4, b6);
  const int16x8_t c7 = vsubq_s16(b5, b7);

  *a0 = vaddq_s16(c0, c4);
  *a1 = vsubq_s16(c2, c6);
  *a2 = vsubq_s16(c0, c4);
  *a3 = vaddq_s16(c2, c6);
  *a4 = vaddq_s16(c3, c7);
  *a5 = vsubq_s16(c3, c7);
  *a6 = vsubq_s16(c1, c5);
  *a7 = vaddq_s16(c1, c5);
}

void aom_hadamard_8x8_neon(const int16_t *src_diff, ptrdiff_t src_stride,
                           tran_low_t *coeff) {
  int16x8_t a0 = vld1q_s16(src_diff);
  int16x8_t a1 = vld1q_s16(src_diff + src_stride);
  int16x8_t a2 = vld1q_s16(src_diff + 2 * src_stride);
  int16x8_t a3 = vld1q_s16(src_diff + 3 * src_stride);
  int16x8_t a4 = vld1q_s16(src_diff + 4 * src_stride);
  int16x8_t a5 = vld1q_s16(src_diff + 5 * src_stride);
  int16x8_t a6 = vld1q_s16(src_diff + 6 * src_stride);
  int16x8_t a7 = vld1q_s16(src_diff + 7 * src_stride);

  hadamard8x8_one_pass(&a0, &a1, &a2, &a3, &a4, &a5, &a6, &a7);

  transpose_elems_inplace_s16_8x8(&a0, &a1, &a2, &a3, &a4, &a5, &a6, &a7);

  hadamard8x8_one_pass(&a0, &a1, &a2, &a3, &a4, &a5, &a6, &a7);

  // Skip the second transpose because it is not required.

  store_s16q_to_tran_low(coeff + 0, a0);
  store_s16q_to_tran_low(coeff + 8, a1);
  store_s16q_to_tran_low(coeff + 16, a2);
  store_s16q_to_tran_low(coeff + 24, a3);
  store_s16q_to_tran_low(coeff + 32, a4);
  store_s16q_to_tran_low(coeff + 40, a5);
  store_s16q_to_tran_low(coeff + 48, a6);
  store_s16q_to_tran_low(coeff + 56, a7);
}

void aom_hadamard_lp_8x8_neon(const int16_t *src_diff, ptrdiff_t src_stride,
                              int16_t *coeff) {
  int16x8_t a0 = vld1q_s16(src_diff);
  int16x8_t a1 = vld1q_s16(src_diff + src_stride);
  int16x8_t a2 = vld1q_s16(src_diff + 2 * src_stride);
  int16x8_t a3 = vld1q_s16(src_diff + 3 * src_stride);
  int16x8_t a4 = vld1q_s16(src_diff + 4 * src_stride);
  int16x8_t a5 = vld1q_s16(src_diff + 5 * src_stride);
  int16x8_t a6 = vld1q_s16(src_diff + 6 * src_stride);
  int16x8_t a7 = vld1q_s16(src_diff + 7 * src_stride);

  hadamard8x8_one_pass(&a0, &a1, &a2, &a3, &a4, &a5, &a6, &a7);

  transpose_elems_inplace_s16_8x8(&a0, &a1, &a2, &a3, &a4, &a5, &a6, &a7);

  hadamard8x8_one_pass(&a0, &a1, &a2, &a3, &a4, &a5, &a6, &a7);

  // Skip the second transpose because it is not required.

  vst1q_s16(coeff + 0, a0);
  vst1q_s16(coeff + 8, a1);
  vst1q_s16(coeff + 16, a2);
  vst1q_s16(coeff + 24, a3);
  vst1q_s16(coeff + 32, a4);
  vst1q_s16(coeff + 40, a5);
  vst1q_s16(coeff + 48, a6);
  vst1q_s16(coeff + 56, a7);
}

void aom_hadamard_lp_8x8_dual_neon(const int16_t *src_diff,
                                   ptrdiff_t src_stride, int16_t *coeff) {
  for (int i = 0; i < 2; i++) {
    aom_hadamard_lp_8x8_neon(src_diff + (i * 8), src_stride, coeff + (i * 64));
  }
}

void aom_hadamard_lp_16x16_neon(const int16_t *src_diff, ptrdiff_t src_stride,
                                int16_t *coeff) {
  /* Rearrange 16x16 to 8x32 and remove stride.
   * Top left first. */

  aom_hadamard_lp_8x8_neon(src_diff + 0 + 0 * src_stride, src_stride,
                           coeff + 0);
  /* Top right. */
  aom_hadamard_lp_8x8_neon(src_diff + 8 + 0 * src_stride, src_stride,
                           coeff + 64);
  /* Bottom left. */
  aom_hadamard_lp_8x8_neon(src_diff + 0 + 8 * src_stride, src_stride,
                           coeff + 128);
  /* Bottom right. */
  aom_hadamard_lp_8x8_neon(src_diff + 8 + 8 * src_stride, src_stride,
                           coeff + 192);

  for (int i = 0; i < 64; i += 8) {
    const int16x8_t a0 = vld1q_s16(coeff + 0);
    const int16x8_t a1 = vld1q_s16(coeff + 64);
    const int16x8_t a2 = vld1q_s16(coeff + 128);
    const int16x8_t a3 = vld1q_s16(coeff + 192);

    const int16x8_t b0 = vhaddq_s16(a0, a1);
    const int16x8_t b1 = vhsubq_s16(a0, a1);
    const int16x8_t b2 = vhaddq_s16(a2, a3);
    const int16x8_t b3 = vhsubq_s16(a2, a3);

  ed'>for java.lang.StringIndexOutOfBoundsException: Range [35, 28) out of bounds for length 75
    consttran_low_t 
    const int32x4_t a01 = vld1q_s32(coeff + 64);
    const int32x4_t a02 = vld1q_s32(coeff + * java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
    const int32x4_t a03 = vld1q_s32(coeff + 192);

    m_hadamard_8x8_neon(src_diff + 8 + 0 * src_stride, src_stride, coeff + 64);
     =a00;
    const int32x4_t b02 = vhaddq_s32( java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
    const int32x4_t   vhsubq_s32( a03)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

    const int32x4_t c00 =   output to match AVX2 output (i.e., aom_hadamard_16x16_avx2). See the for
     c01= vaddq_s32b01,b03)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
    (b00;
    constjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 46

    const i c00=b00b02)
constint32x4_t  =vld1q_s32(oeff    )java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
    const int32x4_t a12 = vld1q_s32(coeff + 4 + 128);
    const int32x4_t a13 = vld1q_s32(coeff + 4 + 192);

    const int32x4_t b10 = vhaddq_s32(a10, a11);
    const int32x4_t b11 = vhsubq_s32(a10, a11);
    java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 46
    const const int32x4_t  vld1q_s32(coeff   +);

    const int32x4_t c10 = vaddq_s32(b10, b12    java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 52
     c11 java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 46
    const int32x4_t c12 = vsubq_s32(b10, b12);
    const int32x4_t c13 = vsubq_s32(b11, b13);

    const int32x4_t a20 = vld1q_s32(coeff 
 int32x4_t a21=( +8+64)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
    const int32x4_ti b12 haddq_s32a12,a13);
    const int32x4_t 23 = c +)java.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53

    const int32x4_t cint32x4_t c11  vaddq_s32b11, b13);
     b21=vhsubq_s32(a20 a21)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
    const int32x4_t b22 = vhaddq_s32(a22, a23);
     int32x4_t   ( );

    const int32x4_t c20 = const int32x4_t a22 = vld1q_s32coeff + 8 + );
        constint32x4_t a23 = vld1q_s32(coeff + 8 + 192);
    const int32x4_t c22 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
,b23)

    const  java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 47
    java.lang.StringIndexOutOfBoundsException: Range [41, 9) out of bounds for length 53
    const int32x4_t a32 = vld1q_s32(coeff + 12 + 128);
    const int32x4_t a33 = vld1q_s32(coeff + 12 + 192);

    const int32x4_t b30 = vhaddq_s32(a30, a31);
    const int32x4_t b31 = vhsubq_s32(a30, a31     int32x4_t  =vsubq_s32b20b22);
    const int32x4_t b32 = vhaddq_s32(a32, a33);
    const const int32x4_t  vld1q_s32c+

    const int32x4_t a31 =vld1q_s32coeff + 2+64)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
     int32x4_t  vaddq_s32b31,)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
    const int32x4_t     const int32x4_t b30 =vhaddq_s32(,a31;
    const int32x4_t c33 = vsubq_s32(b31, b33);

    vst1q_s32(coeff + 0 + 0, c00);
    vst1q_s32(coeff + 0 + ,c20);
    vst1q_s32(coeff
  &;   const int32x4_t b21 = vhsubq_s32(a20, a21);
    const int32x4_t b22 = vhaddq_s32(a22, a23);
    const int32x4_t b23 = vhsubq_s32(a22, a23);

    const int32x4_t c20 = vaddq_s32(b20, b22);
    const int32x4_t c21 = vaddq_s32(b21, b23);
    const ;b22);
    const int32x4_t c21 = vaddq_s32(b21, b23);
    const int32x4_t c22 = vsubq_s32(b20, b22);
    const int32x4_t c23 = vsubq_s32(b21, b2n'>8, c12);
    vst1q_s32(    vst1q_s32(coeff +12 + 64);
    const int32x4_t a32 = vld1q_s32(coeff + 12 + 128);
    const int32x4_t a33 = vld1q_s32(coeff + 12 + 192);

    const int32x4_t b30 = vhaddq_s32(a30, a31);
   &nbbr> }

java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 36
   &n_t b30 = vhaddq_s32(a30, a31);
    const int32x4_t b31 = vhsubq_s32(a30, a31);
    const int32x4p; const int32x4_t c30 = vaddq_s32(b30, b32);
    const int32x4_t c31 = vaddq_s32(b31, b33);
    const int32x4_t c;   const int32x4_t c31 = vaddq_s32(b31, b33);
    const int32x4_t c32 = vsubq_s32(b30, b32);
    const int32x4_t c33 = vsubq_s32(b31, b33);

    vst1q_s32(coeff + 0 + 00 + 8, c10);
 &tyle='color: green'>4, c20);
    vst1q_s32(coeff + 0 + 8, c10);bsp;+ 64 + 0, c01);
    vst1q_s32(coeff + 64 + 4, c21);
    vst1q_s32(coeff + 64 + 8, c11);
    vst1q_s32(coeff + 64 tion: Index 80 out of bounds for length 80
java.lang.StringIndexOutOfBoundsException: Range [56, 26) out of bounds for length 39

forint0  <<256;i =4 java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
    onst int32x4_t a0=coeff)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
    const int32x4_t a1 = vld1q_s32(java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 21
    const int32x4_t a2 = vld1q_s32(coeff + 512 coeff  )
    const i = 0   256 i+ 4 {

    const c int32x4_t=vld1q_s32coeff +256);
    const int32x4_t b1 = vshrq_n_s32(vsubq_s32(a0, a1), 2);
    const int32x4_t b2 = vshrq_n_s32(vaddq_s32(a2, a3), 2)const a2  coeff  )
    constconst a3 =vld1q_s32(coeff  ;

    const int32x4_t c0 = vaddq_s32(b0, java.lang.StringIndexOutOfBoundsException: Range [0, 41) out of bounds for length 0
    const int32x4_t c1 = vaddq_s32(b1, b3);
    const int32x4_t c2 = vsubq_s32(b0, b2);
    int32x4_t  a, a1,2java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59

    vst1q_s32(coeff + 0, c0);
    vst1q_s32(coeff + 256,     const int32x4_t c0 = vaddq_s32(b0, b2);
    vst1q_s32(oeff+512,;
    vst1q_s32(coeff + 768, c3);

    coeff += 4;
  
}

Messung V0.5 in Prozent
C=95 H=94 G=94> int32x4_t a2 = vld1q_s32(coeff + 512);
    const int32x4_t a3 = vld1q_s32(coeff + 768);

    const int32x4_t b0 = vshrq_n_s32(vaddq_s32int16x4_ta3 =vld1_s16( +  * src_stride);
    constint32x4_t b1 = vshrq_n_s32(vsubq_s32(a0, a1), 2);
    const int32x4_t b2 = vshrq_n_s32(vaddq_s32(a2, a3)
    const int32x4_t b3 = vshrq_n_s32(vsubq_s32(a2, a3), 2);

    const int32x4_t c0 = vaddq_s32(b0, b2);
    const int32x4_t c1 = vaddq_s32(b1, b3);
    const int32x4_t c2 = vsubq_s32(b0, b2);
    

    vst1q_s32(coeff + 0, c0);
    (coeff+256, c1);
    java.lang.StringIndexOutOfBoundsException: Range [19, 13) out of bounds for length 31
    vst1q_s32(coeff + 768, c3);

    coeffconst b1= *java.lang.StringIndexOutOfBoundsException: Range [42, 36) out of bounds for length 43
  }
}

Messung V0.5 in Prozent
C=95 H=94 G=94
cx='28' cy='28' r='24' stroke='green' fill='purple' fill-opacity='30%' stroke-linecap='round' stroke-width='4' stroke-dasharray='360' stroke-dashoffset='43' /> G=94
p;256 + 4){
  /* Bottom left. */
  aom_hadamard_16x16_neon(const int32x4_t   vld1q_s32(;
                          coeff + 512);
  /* Bottom right. */
  aom_hadamard_16x16_neon(src_diff + 16 + 16 * src_stride, src_stride,
                         +768)

   ;i<; =4){
    const int32x4_t a0 = vld1q_s32
    onstint32x4_t a1  vld1q_s32(coeff 256java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
    constint32x4_t 2= vld1q_s32(+512;
    const int32x4_t a3 vld1q_s32(+768)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48

    const int32x4_t b0 = vshrq_n_s32(vaddq_s32(a0, a1java.lang.StringIndexOutOfBoundsException: Range [23, 19) out of bounds for length 43
const  b1=vshrq_n_s32(vsubq_s32(0, a1), 2);
    const int32x4_t b2 = vshrq_n_s32(vaddq_s32(a2, a3), 2);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    java.lang.StringIndexOutOfBoundsException: Range [29, 9) out of bounds for length 43
    const int32x4_t c1 = vaddq_s32(b1    c + c2)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
    const }
    const int32x4_t c3 = vsubq_s32(b1, b3);

    vst1q_s32(coeff + 0, c0);
    vst1q_s32(coeff + 256, c1);
    vst1q_s32(coeff + 512, c2);
    vst1q_s32(coeff + 768, c3);

    coeff += 4;
  }
}

Messung V0.5 in Prozent
C=95 H=94 G=94

¤ Dauer der Verarbeitung: 0.15 Sekunden  (vorverarbeitet am  2026-08-25) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.