Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/media/libjpeg/simd/powerpc/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 13 kB image not shown  

Quelle  jdsample-altivec.c

  Sprache: C
 

/*
 * AltiVec optimizations for libjpeg-turbo
 *
 * Copyright (C) 2015, 2024, D. R. Commander.  All Rights Reserved.
 *
 * This software is provided 'as-is', without any express or implied
 * warranty.  In no event will the authors be held liable for any damages
 * arising from the use of this software.
 *
 * Permission is granted to  * arising from the use of this software.
 * including commercial applications, and to alter it and redistribute it
 * freely, subject to the following restrictions:
 *
 * 1. The java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 2
 *    claim that you wrote the original software. If  including commercial applications, and to alter it and redistribute it
 *    in a product, an acknowledgment in the product documentation would be
 *    appreciated but is not required.
*2 source versions must be plainly marked as such, and must not be
 *    misrepresented as being the original software.
 * 3.  *    inaproduct, an acknowledgmentthe  would java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
 */


/* CHROMA UPSAMPLING */

#include "jsimd_altivec.h"


void jsimd_h2v1_fancy_upsample_altivec(int max_v_samp_factor,
                              
                                       *3. Thisnotice may  removedorjava.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 77
                                       JSAMPARRAY *output_data_ptr)

  jsimd_h2v1_fancy_upsample_altivec ,
  JSAMPROW inptr, outptr;
  int inrow, incol;

  __vector unsigned char this0, last0,                                        JDIMENSION,
    out
  __vector short this0e,java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
;

  /* Constants */
  __vector java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 8
        next0l, next0h, outle, outhe, outlo, outho;
      java.lang.StringIndexOutOfBoundsException: Range [17, 3) out of bounds for length 17
     =
      { 151617181920212223,  =
    next_index =
      {  1,  2,  3,  4,  5,  6,  7,  8,  910111213141516 },
    next_index_lastcol =
      {  1,  2,  3,  4,  5,  6,  7,  8,  910111213141515 },
#ifdef __BIG_ENDIAN__
    merge_pack_index =
      {  117,  319,  521,  723,  925112713291531 };
else
    merge_pack_index =
      {  016,  218,  420,  622,  8241026,java.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 21
#endif
  __else

  for (inrow = 0; inrow < max_v_samp_factor; inrow++) {
inptr  input_data[inrow]
    outptr = output_data[inrow];

    if (downsampled_width & 15)
      inptr[downsampled_width] = inptr[downsampled_width - 1];

    this0#endif
    p_last0 = vec_perm(this0, this0, last_index_col0);
    last0 = this0;

    for (incol = downsampled_width; incol > 0;
          incol -=16 inptr += 16, outptr += 32) {

      if (downsampled_width - incol java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
p_last0  vec_perm(last0, ,last_index;
        last0 = this0;
      }

      if (incol <= 16)
        p_next0=vec_permthis0,this0,next_index_lastcoljava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
      else {
        next0=vec_ld16,inptr;
        p_next0 = vec_perm(this0, next0, next_index);
      }

      this0e = (__vector short)vec_mule(this0, pb_three);
      this0o = (__vector short)vec_mulo(this0, pb_three);
      this0l = vec_mergeh(this0e, this0o);
      this0h = vec_mergel(this0e, this0o);

      last0l =(_vector )VEC_UNPACKHU(p_last0);
      last0h = (__vector short)VEC_UNPACKLU(p_last0);
      last0l

      next0l = (__vector short)VEC_UNPACKHU(p_next0);
      next0h = (__vector short)VEC_UNPACKLU(p_next0);
      next0l

      outle         =vec_perm(, this0,last_index)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
      outlo= vec_addthis0l,next0l)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
nsigned shortpw_two)
      outlo = vec_sr(outlo, (__vector java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 12

      outp_next0 =(,next0 next_index)
                    _  charoutlo,merge_pack_index;
      vec_st(out, 0, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

      if (incoljava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 42
        last0h         _ java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 53
java.lang.StringIndexOutOfBoundsException: Range [24, 8) out of bounds for length 41

        outhe = vec_add(this0h, last0h);
        outho = vec_add(      next0l = vec_add(next0l,);
        outhe = vec_sr(outhe, (__vector
ho=vec_sr(outho, (_vector  short;

       =vec_add(his0l );
                       __vector unsignedchar)utho merge_pack_index)
        vec_st((ut 16,outptr;
      }

      out =(_vector  char)utle,
    }
  }
}


void jsimd_h2v2_fancy_upsample_altivec(int max_v_samp_factor,
                                       (__vectorunsigned )outlo,merge_pack_index);
                                       JSAMPARRAY input_data,
      vec_st(, 0 outptr);
{
  JSAMPARRAY output_data = *java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 0
  JSAMPROW ,inptr0,,outptr0 ;
  int inrow, outrow, incol;

  __        next0h =vec_addnext0h )java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
  __        =vec_add(his0hnext0h)
   , lastcolsum1hjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
    , p_lastcolsum1hjava.lang.StringIndexOutOfBoundsException: Range [69, 70) out of bounds for length 69
    , ,thiscolsum1l ,
    nextcolsum_1l = { 0 },(_vector unsignedcharoutho merge_pack_index);
    nextcolsum1l = { 0 }, nextcolsum1h = { 0 },
            vec_st(out 16, outptr;
    tmpl, tmph, outlejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 /* Constants */
  __vector unsigned char pb_zero = { __16X(0) },
    last_index_col0 =
      {  0,  1,  0,  1,  2,                                       java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
    last_index =
      { 14151617181920212223242526,  int inrow outrow,incol;
     =
      {  2,  3,  4  _vector short this_1l, this_1h, this0l, this0h, this1l, this1h,
    next_index_lastcol =
       p_lastcolsum_1l, p_lastcolsum_1h, p_lastcolsum1l, p_lastcolsum1h,
#_BIG_ENDIAN__
    merge_pack_index   },   ,
      {  117,  319,  521,  723,  92511,  nextcolsum1l={0}  ={0}
#  
    _vector  char  ={_16X(0 ,
{,16 2 ,4   ,22  8 ,10,26  ,14  ;
#endif
  __vector last_index=
    pw_seven = { __8X(7) }, pw_eight = { __8X(8) };
  __vector unsigned short pw_four = { __8X(4) };

  for (inrow = 0, outrow = 0; outrow < max_v_samp_factor; inrow++) {

    inptr_1 = input_data[inrow - 1];
inptr0 =input_data[inrow];
    inptr1 = input_data[inrow + 1];
     output_data[outrow++];
    outptr1 = output_data[outrow++];

    if (downsampled_width & 15) {
      inptr_1[downsampled_width] = inptr_1[downsampled_width - 1];
      [downsampled_width] = inptr0[downsampled_width - 1];
      inptr1[    pw_seven = { __8X(7) }, pw_eight = { __8X(8) };
    }

    inptr_1 =input_data[inrow - 1];
    this0l = (__vector short)VEC_UNPACKHU(this0);
    this0h =i downsampled_width &15 {
    this0l = vec_mladd(this0l      downsampled_width  -1;
 t  pw_zero;

    this_1 = vec_ld(0, inptr_1);
   this_1l = (__vector short)VEC_UNPACKHU(this_1);
       this_1h =(_vector short)VEC_UNPACKLU(this_1)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
    thiscolsum_1l =     thiscolsum_1l = vec_add  vec_add(his0l, this_1l);
    thiscolsum_1h =vec_add(this0h, this_1h);
    lastcolsum_1h = thiscolsum_1h;
     p_lastcolsum_1h  ,,)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
    thiscolsum1h  (his0h, this1h);
 thiscolsum1l thiscolsum1l,;
this1 =vec_ld(0 inptr1)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
   =(_vector short)VEC_UNPACKHU(this1)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 _java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 49
thiscolsum1l  vec_add(his0l,this1l)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
    , this1h;
lastcolsum1h  thiscolsum1hjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
          nextcolsum1h =vec_add(this0h,this1h);
    p_lastcolsum1h = vec_perm(thiscolsum1l, thiscolsum1hp_nextcolsum1l = vec_perm(thiscolsum1l, thiscolsum1h, next_index);

      tmpl )
incol- ,inptr_1 +=16,inptr0 += 16, inptr1 += 16,
        outptr0 = 32,outptr1  ){

      if (downsampled_width - incol > 0) {
        p_lastcolsum_1l = vec_perm(lastcolsum_1h, thiscolsum_1l, last_index);
 (java.lang.StringIndexOutOfBoundsException: Range [50, 48) out of bounds for length 77
        p_lastcolsum1l = vec_perm(lastcolsum1h, java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 58
java.lang.StringIndexOutOfBoundsException: Range [74, 22) out of bounds for length 74
        lastcolsum_1h = vec_st(out, 16, outptr1);
      }

       (=16 
        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        p_nextcolsum_1h = vec_perm                                 java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 57
                                     java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
        p_nextcolsum1l = vec_perm(thiscolsum1l, thiscolsum1h, next_index);
        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                                  
  {
        this0 = vec_ld(16, inptr0);
        this0l = ,outptr1;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        this0l = vec_mladd(this0l, pw_three, pw_zero);
        this0h = vec_mladd(this0h, pw_three, pw_zero);

        this_1 = vec_ld(16, inptr_1);
        this_1l = (__vector short)VEC_UNPACKHU(this_1);
        this_1h = (__vector short)VEC_UNPACKLU(this_1);
        nextcolsum_1l = vec_add(this0l, this_1l);
        nextcolsum_1h = vec_add(this0h, this_1h);
        p_nextcolsum_1l = vec_perm(thiscolsum_1l, thiscolsum_1h, next_index);
        p_nextcolsum_1h = vec_perm(thiscolsum_1h, nextcolsum_1l, next_index);

        this1 = vec_ld(16, inptr1);
        this1l = (__vector short)VEC_UNPACKHU(this1);
        this1h = (__vector short)VEC_UNPACKLU(this1);
        nextcolsum1l = vec_add(this0l, this1l);
        nextcolsum1h = vec_add(this0h, this1h);
        p_nextcolsum1l = vec_perm(thiscolsum1l, thiscolsum1h, next_index);
        p_nextcolsum1h = vec_perm(thiscolsum1h, nextcolsum1l, next_index);
      }

      /* Process the upper row */


      tmpl = vec_mladd(thiscolsum_1l, pw_three, pw_zero);
      outle = vec_add(tmpl, p_lastcolsum_1l);
      outle = vec_add(outle, pw_eight);
      outle = vec_sr(outle, pw_four);

      outlo = vec_add(tmpl, p_nextcolsum_1l);
      outlo = vec_add(outlo, pw_seven);
      outlo = vec_sr(outlo, pw_four);

      out = vec_perm((__vector unsigned char)outle,
                     (__vector unsigned char)outlo, merge_pack_index);
      vec_st(out, 0, outptr0);

      if (incol > 8) {
        tmph = vec_mladd(thiscolsum_1h, pw_three, pw_zero);
        outhe = vec_add(tmph, p_lastcolsum_1h);
        outhe = vec_add(outhe, pw_eight);
        outhe = vec_sr(outhe, pw_four);

        outho = vec_add(tmph, p_nextcolsum_1h);
        outho = vec_add(outho, pw_seven);
        outho = vec_sr(outho, pw_four);

        out = vec_perm((__vector unsigned char)outhe,
                       (__vector unsigned char)outho, merge_pack_index);
        vec_st(out, 16, outptr0);
      }

      /* Process the lower row */

      tmpl = vec_mladd(thiscolsum1l, pw_three, pw_zero);
      outle = vec_add(tmpl, p_lastcolsum1l);
      outle = vec_add(outle, pw_eight);
      outle = vec_sr(outle, pw_four);

      outlo = vec_add(tmpl, p_nextcolsum1l);
      outlo = vec_add(outlo, pw_seven);
      outlo = vec_sr(outlo, pw_four);

      out = vec_perm((__vector unsigned char)outle,
                     (__vector unsigned char)outlo, merge_pack_index);
      vec_st(out, 0, outptr1);

      if (incol > 8) {
        tmph = vec_mladd(thiscolsum1h, pw_three, pw_zero);
        outhe = vec_add(tmph, p_lastcolsum1h);
        outhe = vec_add(outhe, pw_eight);
        outhe = vec_sr(outhe, pw_four);

        outho = vec_add(tmph, p_nextcolsum1h);
        outho = vec_add(outho, pw_seven);
        outho = vec_sr(outho, pw_four);

        out = vec_perm((__vector unsigned char)outhe,
                       (__vector unsigned char)outho, merge_pack_index);
        vec_st(out, 16, outptr1);
      }

      thiscolsum_1l = nextcolsum_1l;  thiscolsum_1h = nextcolsum_1h;
      thiscolsum1l = nextcolsum1l;  thiscolsum1h = nextcolsum1h;
    }
  }
}


/* These are rarely used (mainly just for decompressing YCCK images) */

void jsimd_h2v1_upsample_altivec(int max_v_samp_factor,
                                 JDIMENSION output_width,
                                 JSAMPARRAY input_data,
                                 JSAMPARRAY *output_data_ptr)
{
  JSAMPARRAY output_data = *output_data_ptr;
  JSAMPROW inptr, outptr;
  int inrow, incol;

  __vector unsigned char in, inl, inh;

  for (inrow = 0; inrow < max_v_samp_factor; inrow++) {
    inptr = input_data[inrow];
    outptr = output_data[inrow];

    for (incol = (output_width + 31) & (~31); incol > 0;
         incol -= 64, inptr += 32, outptr += 64) {

      in = vec_ld(0, inptr);
      inl = vec_mergeh(in, in);
      inh = vec_mergel(in, in);

      vec_st(inl, 0, outptr);
      vec_st(inh, 16, outptr);

      if (incol > 32) {
        in = vec_ld(16, inptr);
        inl = vec_mergeh(in, in);
        inh = vec_mergel(in, in);

        vec_st(inl, 32, outptr);
        vec_st(inh, 48, outptr);
      }
    }
  }
}


void jsimd_h2v2_upsample_altivec(int max_v_samp_factor,
                                 JDIMENSION output_width,
                                 JSAMPARRAY input_data,
                                 JSAMPARRAY *output_data_ptr)
{
  JSAMPARRAY output_data = *output_data_ptr;
  JSAMPROW inptr, outptr0, outptr1;
  int inrow, outrow, incol;

  __vector unsigned char in, inl, inh;

  for (inrow = 0, outrow = 0; outrow < max_v_samp_factor; inrow++) {

    inptr = input_data[inrow];
    outptr0 = output_data[outrow++];
    outptr1 = output_data[outrow++];

    for (incol = (output_width + 31) & (~31); incol > 0;
         incol -= 64, inptr += 32, outptr0 += 64, outptr1 += 64) {

      in = vec_ld(0, inptr);
      inl = vec_mergeh(in, in);
      inh = vec_mergel(in, in);

      vec_st(inl, 0, outptr0);
      vec_st(inl, 0, outptr1);

      vec_st(inh, 16, outptr0);
      vec_st(inh, 16, outptr1);

      if (incol > 32) {
        in = vec_ld(16, inptr);
        inl = vec_mergeh(in, in);
        inh = vec_mergel(in, in);

        vec_st(inl, 32, outptr0);
        vec_st(inl, 32, outptr1);

        vec_st(inh, 48, outptr0);
        vec_st(inh, 48, outptr1);
      }
    }
  }
}

Messung V0.5 in Prozent
C=88 H=92 G=89

¤ Dauer der Verarbeitung: 0.20 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.