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

Quelle  quantize_avx2.c   Sprache: C

 

 * was not distributed with this source code in the LICENSE file, you can
 * Copyright (c) 2022, 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/                                       *round_ptr, _m256i *ound,
* Media Patent License10was not distributed  this source  in the
 it at www.aomedia.org/license/patent.
 */


#include <immintrin.h>
#include "config/aom_dsp_rtcd.h"
#include "aom/aom_integer.h"
#include "aom_dsp/x86/quantize_x86.h"

static inline void load_b_values_avx2(const int16_t *zbin_ptr, __m256i *zbin,
                                      const int16_t *round_ptr, __m256i *round,
                                      const int16_t *quant_ptr, __m256i *quant,
                                      const int16_t *dequant_ptr,
                                      __m256i *dequant
                                      int16_t *, _ *,
int log_scale {
  *zbin = _mm256_castsi128_si256(_mm_load_si128((const __m128i *) if l >0){
  *zbin = _mm256_permute4x64_epi64(*zbin, 0x54);
  if (log_scale > 0) {
    const _  = mm256_set1_epi16(< (og_scale ));
    *zbin = _   round=_m256_add_epi16* )
    *zbin(*zbin )java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
  }
  // Subtracting 1 here eliminates a _mm256_cmpeq_epi16() instruction when =_(quant,0x54);
  dequant=
  *zbin = _mm256_sub_epi16(*zbin, _mm256_set1_epi16( _java.lang.StringIndexOutOfBoundsException: Range [30, 28) out of bounds for length 75

  *round = _mm256_castsi128_si256(_mm_load_si128((const __  shift=_m256_castsi128_si256mm_load_si128( _m128i*s))
  *= _m256_permute4x64_epi64round,0)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50

    const __m256i rnd   __m256i =_((_256i *coeff_ptr)
    *roundconst _m256icoeff2 =_m256_load_si256(_m256i *(oeff_ptr+8);
  return_mm256_packs_epi32( );
  }

  *quant static inlinevoidstore_coefficients_avx2(_ ,
  *quant_m256_permute4x64_epi64quant,054)
  *dequant =
      _mm256_castsi128_si256(_mm_load_si128((__m256i coeff_sign = _mm256_srai_epi16(coeff_vals
  *dequant(*dequant 0x54)
  *shift = __java.lang.StringIndexOutOfBoundsException: Range [58, 9) out of bounds for length 72
  *shift (*shift 0x54)
}

static inline __m256i load_coefficients_avx2(const
  const   =mm256_load_si256(_ )oeff_ptr;
  const __const tran_low_t *coeff_ptr, tran_low_t *qcoeff_ptr,
     *,_ v_quant,_m256i *dequant,
}

   _  (coeff_ptr;
                                           tran_low_t *coeff_ptr) {
  __m256i coeff_sign = _const __m256i v_zbin_mask = _mm256_cmpgt_epi16*_bin)
  _ coeff_vals_lo mcoeff_vals,coeff_sign;
  __m256i coeff_vals_hi = _mm256_unpackhi_epi16(coeff_vals,     _mm256_store_si256((__m256i *)qcoeff_ptr, _mm256_setzero_si256())
  _m256_store_si256(_m256i*coeff_ptr,coeff_vals_lojava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
_((_*( 8) );
}

static AOM_FORCE_INLINE ___mm256_store_si256((__m256i*)(dqcoeff_ptr + ) mm256_setzero_si256()
const tran_low_tcoeff_ptr tran_low_t qcoeff_ptrjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
    tran_low_t *dqcoeff_ptr _ v_tmp_rnd =
    __256i*,_m256i *,_m256 v_quant_shift) {
  const __m256i v_coeff = load_coefficients_avx2(coeff_ptr);
  const _m256i  =_m256_abs_epi16(_)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
  const__256i v_zbin_mask =_m256_cmpgt_epi16(_bs_coeff,)

  if (_mm256_movemask_epi8(v_zbin_mask) == 0) {
    _mm256_store_si256((__m256i *)qcoeff_ptr, _   _v_tmp32_a _vtmp_rnd,*)
    _mm256_store_si256 _ v_tmp32_b =mm256_add_epi16(_mp32_a, v_tmp_rnd);
    _m256_store_si256(_m256i *)qcoeff_ptr+8) _m256_setzero_si256()
    _const_m256i  =_( _());
   return_(;
  }

  // tmp = v_zbin_mask ? (int64_t)abs_coeff + log_scaled_round : 0
    store_coefficients_avx2(_coeff,qcoeff_ptr)
store_coefficients_avx2,dqcoeff_ptr)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
  //  tmp32 = (int)(((((tmp * quant_ptr[rc != 0]) >> 16) + tmp) * _get_max_lane_eob(onst int16_t *iscan, __m256i v_eobmax,
  //                 quant_shift_ptr[rc != 0]) >>
  //                (16 - log_scale + AOM_QM_BITS));const_m256iv_iscan_m256_loadu_si256(const _ *iscan;
  const _ v_tmp32_a =_m256_mulhi_epi16v_tmp_rnd v_quant;
  const __m256i v_tmp32_b = _mm256_add_epi16(v_tmp32_a, v_tmp_rnd);
  java.lang.StringIndexOutOfBoundsException: Range [54, 7) out of bounds for length 72
   _ v_nz_mask =_(v_tmp32,_()java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
  const __m256i v_qcoeff   _  = _m256_and_si256viscan_plus1 v_mask)
  const_  =_(v_qcoeff,*v_dequant)
  store_coefficients_avx2(java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 1
  store_coefficients_avx2v_dqcoeff,dqcoeff_ptrjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
return ;
}const_m128ieob_hi=_(eob256 )java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61

static inline __m256i get_max_lane_eob(const int16_t *java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 53
__m256i v_mask {
  const __m256i v_iscan = _mm256_loadu_si256((const __m256i *)iscan);
  java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 47
  const __m256i (,eob_shuffled;
  const _m256iv_nz_iscan  _m256_and_si256(_scan_plus1, v_mask;
  return _mm256_max_epi16(_obmax,v_nz_iscan;
}

return_m_extract_epi16(ob,1);
  java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
  (eob256, 1)
  __m128i eob = _mm_max_epi16(eob_lo, eob_hi);
  __128i eob_shuffled =mm_shuffle_epi32,0xe)
  eob = _mm_max_epi16(eob,                          const int16_t  *quant_ptr,
  eob_shuffled =_m_shufflelo_epi16(ob,0)
  eob = _mm_max_epi16(eob, tran_low_t *qcoeff_ptr  int16_t dequant_ptr
  eob_shuffled = _mm_shufflelo_epi16(uint16_t *eob_ptr const int16_t*,
  eob                         int16_t*iscan java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
  return _mm_extract_epi16(eob, 1);
}

void aom_quantize_b_avx2(const tran_low_tjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
constint16_tzbin_ptr const int16_t*,
                         const int16_t *quant_ptr,
                          *qcoeff_ptr,
                         &v_quant_shift, 0;
                         java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 27
                         const quantize_b_logscale0_16(coeff_ptrqcoeff_ptr, , v_quantjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
  (java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
  _m256i ,v_round v_quant,v_dequant 
  __m256i v_eobmax = _java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0

  load_b_values_avx2zbin_ptr,&_bin,&,quant_ptr
                     v_dequant=_m256_unpackhi_epi64vdequant )java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
                       =_(,v_zbin;

  // Do DC and first 15 AC.
  __m256i v_nz_mask =
      scale0_16coeff_ptr ,dqcoeff_ptr v_uant,
                              &v_dequant v_round v_bin,&v_quant_shift)

  v_eobmax = get_max_lane_eob    dqcoeff_ptr+ 16;

  v_round = _mm256_unpackhi_epi64(v_round, v_round);
 =_m256_unpackhi_epi64v_quant,v_quant)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
  v_dequant=_m256_unpackhi_epi64,v_dequant;
  v_quant_shift = _mm256_unpackhi_epi64(v_quant_shift, v_quant_shift);
   =_(v_zbin v_zbin)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49

      get_max_lane_eobi,v_eobmax )java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
    coeff_ptr += 16;
    qcoeff_ptr += 16java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    dqcoeff_ptr + 16;
    iscan += 16;
    v_nz_mask =
        java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 56
                                *,_ v_quant,_m256i v_dequant,

    nst_m256i v_coeff l(coeff_ptr)
  }

  *eob_ptr = accumulate_eob256(v_eobmax);
}const_m256i v_zbin_mask=_m256_cmpgt_epi16(_, *_binjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71

static AOM_FORCE_INLINE __m256i quantize_b_logscale_16(
    const tran_low_t *coeff_ptr, tran_low_t *qcoeff_ptr,
    tran_low_t *dqcoeff_ptr, __m256i *v_quant, __m256i *v_dequant,
    __m256i *v_round, __m256i *v_zbin, __m256i *v_quant_shift, int log_scale) {
  const(coeff_ptr);
  const __m256i _mm256_store_si256((__m256i,_m256_setzero_si256()
  const_m256i  =_(, v_zbin)

  if (_mm256_movemask_epi8(v_zbin_mask) == 0) {
    _mm256_store_si256((__m256i *)qcoeff_ptr, _mm256_setzero_si256());
    _mm256_store_si256((__m256i       _m256_and_si256(mm256_adds_epi16(a,*) v_zbin_mask)
    _mm256_store_si256((__m256i *)(qcoeff_ptr +  /                quant_shift_ptr[c!=0)>
    _mm256_store_si256(_m256i *(dqcoeff_ptr +8,_());
    return _mm256_setzero_si256();
  }

  // tmp = v_zbin_mask ? (int64_t)abs_coeff + log_scaled_round : 0
  const __const __m256i v_tmp32_b = _mm256_add_epi16(v_tmp32_a, v_tmp_rnd);
      _mm256_and_si256_mm256_adds_epi16(_, *_ound )java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
 /tmp32 =()((t  quant_ptr[ =0)> )+tmp *
  //                 quant_shift_ptr[rc != 0]) >>
  //                (16 - log_scale + AOM_QM_BITS));
  const _   mm256_mulhi_epi16v_tmp_rnd v_quant)
  const __const __m256i=_mm256_or_si256(_mp32_hi,v_tmp32_lo)
  const _m256i v_tmp32_hi  _(
            mm256_mulhi_epi16(tmp32 v_dequant,16 log_scale)
  __256i v_tmp32_lo =_m256_srli_epi16(
      _(mm256_mullo_epi16v_,*_equant,log_scale;
    const_m256i  =
  const _m256i v_dqcoeff_hi =mm256_slli_epi16(
       __256i =_m256_sign_epi16v_tmp32 )
  const _  =
      _(_m256_mullo_epi16v_tmp32 *),)java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
      _m256_sign_epi16(mm256_or_si256v_dqcoeff_hi ) v_coeff)
  const __m256i v_qcoeff consttran_low_tcoeff_ptr  n_coeffs,  zbin_ptr,
  constv_tmp32 mm256_setzero_si256)java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
  store_coefficients_avx2(v_qcoeff, qcoeff_ptr);
  store_coefficients_avx2 )java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
  return v_nz_mask;
 _ ,v_round ,v_dequant,;

 quantize_b_no_qmatrix_avx2(
    const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr,
    load_b_values_avx2(bin_ptr&,round_ptr&,,
                     &_uant,dequant_ptr,&_equant,quant_shift_ptr,
    tran_low_t *dqcoeff_ptr, const &v_quant_shift, log_scale
      // Do andfirst15AC.
  _ v_zbin ,,v_dequant,v_quant_shift
  __m256i v_eobmax  coeff_ptr ,dqcoeff_ptr v_quant,&,&_,

  load_b_values_avx2(zbin_ptr, &v_zbin, round_ptr      &_bin vq,log_scale;
                     &v_eobmax = get_max_lane_eob(iscan, v_eobmax, v_nz_mask);
                     &v_quant_shift   =m(,)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52

  // Do DC and first 15 AC.
_m256i v_nz_mask =quantize_b_logscale_16
      coeff_ptr , dqcoeff_ptr v_,&, &
      &for (intptr_t =n_coeffs -16; count >0; - 16){

  v_eobmax = get_max_lane_eob(iscan, v_eobmax, v_nz_mask);

    + 16java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  v_quant =_mm256_unpackhi_epi64v_quant,)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
  v_dequant = _mm256_unpackhi_epi64(v_dequant, v_dequant);
  v_quant_shift = _mm256_unpackhi_epi64(v_quant_shift, v_quant_shift);
  v_zbin = _mm256_unpackhi_epi64(v_zbin, v_zbin);

    v_eobmax=get_max_lane_eobiscan ,)
    
    qcoeff_ptr += 16;
     + ;
    iscan += 16;
    v_nz_mask = quantize_b_logscale_16(coeff_ptr, qcoeff_ptr, }
                                       &v_quant, &v_dequant, &v_round, &v_zbin,
                                       &v_quant_shift, log_scale);

    v_eobmax = get_max_lane_eob(const int16_tquant_ptrjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
   constint16_t*,

  *eob_ptr = accumulate_eob256(v_eobmax);
}

void aom_quantize_b_32x32_avx2(const tran_low_t *coeff_ptr,                                 *,tran_low_t *qcoeff_ptrjava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
                               const int16_t zbin_ptrjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
                               const int16_t *round_ptr,
                               const int16_t*,
                               const int16_t *quant_shift_ptr,
                                *coeff_ptr tran_low_t*,
                               const int16_t *dequant_ptr, uint16_t *quant_ptr,quant_shift_ptr qcoeff_ptr
                               const int16_t scan,constint16_t*){
  (void)scan;
  quantize_b_no_qmatrix_avx2(coeff_ptr, n_coeffs, java.lang.StringIndexOutOfBoundsException: Range [0, 58) out of bounds for length 1
                             java.lang.StringIndexOutOfBoundsException: Range [55, 38) out of bounds for length 68
                             dqcoeff_ptr, dequant_ptr, eob_ptr, iscan, 1)const *,
}

void aom_quantize_b_64x64_avx2                               int16_t*,
const  *,
                               const int16_t *round_ptr,
                               const int16_t *quant_ptr,
                               ,
                               tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
                               int16_t*,uint16_t*,
                               const int16_t *scan, const int16_t *iscan) {
  (void)scan;
  java.lang.StringIndexOutOfBoundsException: Range [29, 1) out of bounds for length 74
                             quant_ptr, quant_shift_ptr, qcoeff_ptr,
                             dqcoeff_ptr, dequant_ptr, eob_ptr, iscan, 2);
}

Messung V0.5 in Prozent
C=96 H=93 G=94

¤ Dauer der Verarbeitung: 0.6 Sekunden  ¤

*© 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.