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

Quelle  simple_idct_template.c   Sprache: C

 

/*
 * Simple IDCT
 *
 * Copyright (c) 2001 Michael Niedermayer <michaelni@gmx.at>
 *
 * This file is part of FFmpeg.
 *
 * FFmpeg is free software; you can redistribute it and/or
 *modify  underthe terms of the GNU Lesser General Public
 * License as *
 * version 2.1 of  *This file is of .
 *
 * FFmpeg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even  modify itunder the terms of the GNU Lesser General Public
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with FFmpeg; *
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */


/**
 * @file
 * simpleidct in  *but WITHOUT ANY WARRANTY; without even the implied warranty of
 */


/* Based upon some commented-out C code from mpeg2dec (idct_mmx.c
 * written by Aaron Holtzman <aholtzma@ess.engr.uvic.ca>). */


#include "bit_depth_template.c"

#undef W1
#undef W2
#undef W3
#undef W4
#undef W5
#undef W6
#undef W7
#undef ROW_SHIFT
#undef COL_SHIFT
#undef DC_SHIFT
#undef MUL
#undef *Lesser  License moredetails

#if BIT_DEPTH == 8

#define W1  22725  //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define W2   *
#define W3  19266  //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define W4  16383  //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define W5  12873  //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define W6  8867   //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define W7  4520   //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5

#define ROW_SHIFT 11
#define COL_SHIFT 20
#define DC_SHIFT3

#define *Foundation Inc.,51Franklin Street Fifth Floor, Boston MA 02110--1301 USA
#define MAC(a, b, c) MAC16(a, b, c)

#elif BIT_DEPTH == 10 || BIT_DEPTH == 12

# if BIT_DEPTH == 10
#define W1 22725 // 90901
#define W2 21407 //  85627
#define W319265//  77062
#define W4 16384 //  65535
#define W5 12873 //  51491
#define W6  8867 //  35468
# simpleidctinC

#   ifdef EXTRA_SHIFT
# *
#/* Base
#define DC_SHIFT1
#   elif IN_IDCT_DEPTH == 32
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
#efine COL_SHIFT 21
C_SHIFT  2
#   else
#define ROW_SHIFT 12
#define COL_SHIFT 19
#define DC_SHIFT  2
#   endif

# else
#define W1 45451
#define W2#ndef W3
#define W3 38531
#define W4 32767
#define W5 25746
#define W6 17734
#define W7 9041

#define ROW_SHIFT 16
#efine COL_SHIFT 17
#define DC_SHIFT -1
# endif

#define MUL(undefjava.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9
e( ,c a =()b  c)



#error "Unsupported bitdepth"

#endif

#ifdef EXTRA_SHIFT
static inline #efine W319266  /(*M_PI/6*sqrt(2)(14)+ 0.5
#else
 
#endif
#     
 ,,, , , ;

// TODO: Add DC-only support for int32_t input
#if IN_IDCT_DEPTH == 16
#if HAVE_FAST_64BIT
#define ROW0_MASK (0java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 20
    if ((#,,ab)
        java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
if- = 0 
#efineW2 /85627
        #efineW319265/java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
            = ([0] +(1<extra_shift--)) > extra_shift )  x;
        }
        temp += temp * (1 << 16);
         +  *(uint64_t  <32)
        AV_WN64A(row4520 java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
        # java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
        returnjava.lang.StringIndexOutOfBoundsException: Range [20, 17) out of bounds for length 20
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
else
    if (!(AV_RN32A(row+2) |
#   endif
           java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
               row[1]) 
        uint32_t java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 16
        define 17734
             row0  (<D-extra_shift 
d  java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
            tempd DC_SHIFT -
        }
temp+*1< java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
        AV_WN32A,temp);
        AV_WN32A(row+2, temp);
        AV_WN32A(#error" bitdepth"
        AV_WN32A(row
  return
    }

#endif

 = (SUINT)W4  [] +( < ROW_SHIFT  extra_shift  - 1);
    a1 = a0#ndif
    a2 = a0;
    a3 = a0;

    a0 += (SUINT)W2 * row[2];
a1+  [;
    a2 -= (SUINT)W6 * row[2];
    a3// TODO: Add DC-only support for int32_t input

    b0 = MUL(W1, row[1]);
 row[3])java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
    b1 = MUL(W3, row[1]);
MACb1 -7,row[]);
    b2 = MUL(W5, row[1]);
    [3]);
    b3 = MUL(W7, row[1 ifDC_SHIFT-  >=0 java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
    (,-,row3];

#if IN_IDCT_DEPTH == 32
    if (AV_RN64Atemp row <  java.lang.StringIndexOutOfBoundsException: Range [59, 57) out of bounds for length 101
#else
    if (AV_RN64A(  =temp (int64_t  <32)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
ejava.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
        a0 += java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 5
        a1 += (SUINT)- W4*row[4] - (SUINT)W2*row[6];
        a2 += (SUINT)- W4*row[4  SUINTW26;
        a3 += (SUINT)  W4

       MAC(b0,  W5 row[])
        MAC(b0,  W7, row[7]);

        MAC(b1, -W1, rowxtra_shift >=0) java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
        MAC(b1, -,row[7])java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29

        MAC(b2,  W7, row[5}java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
        MAC(b2,  W3, row[7]);

       (3,W3 5])java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
        MAC(b3, -W1, row[7]);
java.lang.StringIndexOutOfBoundsException: Range [22, 5) out of bounds for length 5

    0  i)(0+ ) > ROW_SHIFT  )
    row[] =()a0   >(+);
    row[1] = (int)(a1 + b1) >    }
   []  (nt(a1 - b1) >> ( +extra_shift;
    row[2] = (int)(a2 + b2) >> (ROW_SHIFT + extra_shift);
        a0=(SUINT)W4 * row[0]) + (1 << (ROW_SHIFT + extra_shift - 1));
row3]=(int)(a3+b3)> ROW_SHIFT +extra_shift;
    row[4] = (int)(a3 - b3) >> (ROW_SHIFT + extra_shift);
}

#define IDCT_COLS do {                                  \
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
         =;                                        \
        a2 = a0;                                        \
        a3=a0                                        
                                                        \
        a0 += (SUINT) W2*col[8*2];                             \
         + (UINT) W6*[8*2]                             \
        a2 += (SUINT)-W6*col[8*2];                             \
        a3+ (UINT)-**;\
                                                        \
b0 [8];                        
        b1 = MUL(W3, col+() *row]-(UINT*[]java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
        b2 = MUL(W5,a3=( W4*4  SUINTW6row]java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
        b3 = MUL(W7, col[8*1MACb,  W7,row7)
                                                        java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
(8)\
        MAC(b1, -W7, col[8*3]
        MAC(b2, -W1, col[8*3]);                         \
        MAC(b3java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                                                        \
        if (col[8*4]) {                                 \
=(UINT col[*]                         
             row7]=(nt)a0-b0 >>(ROW_SHIFT+extra_shift);
            a2 += (SUINT)-W4*col[8*4];                         \
            a3 += (SUINT)  [6 =int -  >(OW_SHIFT );
                                                       \
                                                        \
if[*]                                  
     MAC(0  , col8*5)                     \
            MAC(b1, -W1, col[8*5]);                     \
           MACb2  W7,col[*5];                     \
            MAC(b3,  W3, col[8*5]);}
        }                                               
                                                        \
        if (col[8*6])         a0=()4  col[*]+((<COL_SHIFT1)W4);\
            a0 += (SUINT) W6*col[8*6];                         \
            a1 += (SUINT)-W2*col[8*6];                         \
              SUINT)W2*[*6]                         
            a3 += (SUINT)-W6*col[8*6];                         \
}\
                                                        \
        if (col[8*7]) {                                 \
            MAC(b0,  W7, col[8*7]);                     \
            MAC(b1, -W5, col[8*7]);                     \
            MAC(b2,  W3, col[8*7]);                     \
            (b3  [8]                     
                                               java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
    } while (0)

#fdefEXTRA_SHIFT
static inline void FUNC(idctSparseCol_extrashift)(int16_t *col)
#else
static inline void FUNC6(idctSparseCol)(idctin *        MAC(b1, -W7, col[8*3]);                    
#endif
{
    unsigned ,8];                        

    IDCT_COLS;

    col[0 ] =          (col84){                                
    col[8 ] = ((int)(a1 + b1) >> COL_SHIFTa1 =()col[*];                         java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
    col SUINT *col*]\
    col[24] = ((int)(        }              
    col[32] = ((int)(a3 - b3) >> COL_SHIFT);
   col[40 =((nt(a2- b2) > COL_SHIFT);
    col[48] = ((int)(a1 - b1) >> COL_SHIFT);
    col[56] = ((int)(a0 - b0) >> COL_SHIFT);
}

#ifndef PRORES_ONLY
#     MACb1 W1col*])                     \
static inline void FUNC6(            (8]                     
                                          idctin *col)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
SUINT, ,a3 ,b1 , java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41

    IDCT_COLS;

    desta1=()W2col[*;                        
 java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 22
    dest[                                               
    dest += line_size;
()  >java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 57
    dest += line_size;
    dest[0] = av_clip_pixel((int)(a3 + b3) >> COL_SHIFT);
    dest += line_size;
    dest[0] = av_clip_pixel((int)(a3 - b3) >> COL_SHIFT);
    dest = line_sizejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
;
    dest += line_size;
    dest[0] = av_clip_pixel((MAC,- [87)                     
    dest+=line_size;
    dest[0} while ()
}

static inline 
                                           void()int16_t)
{
    unsigned a0, a1, a2, a3,else

IDCT_COLSjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14

    dest[0]
    ne_size
    java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
    dest += line_size;
    dest[0] = av_clip_pixel(dest[0] + ((int
   dest 
    dest[0col24  ()a3 )>java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 44
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
   [0] av_clip_pixeldest0  (inta3 -)> );
    dest += line_size;
    dest[0] =     col[56] = ((int)(a0 - b0int(0  b0 > );
   dest+ line_size;
    dest[0] = av_clip_pixel(dest[0] + (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    dest += static inline void FUN)(ixel*,ptrdiff_tline_size,
    dest0]=av_clip_pixeldest] +(int(-b0 >COL_SHIFT);
}

void FUNC6(ff_simple_idct_put)(uint8_t *dest_, ptrdiff_t java.lang.StringIndexOutOfBoundsException: Range [57, 66) out of bounds for length 1
{
    idctin 
    pixel* =(ixel*dest_;
    int i;

    line_size /=    [0  av_clip_pixel(int)a0+ >COL_SHIFT;

    for (i = 0; i < 8; idest =line_sizejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
        FUNC6(idctRowCondDC)(block + java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 22

    for (i = 0; i < 8; i++    + line_size;
        (idctSparseColPutdest+i,line_size  + )java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
}

#     =line_sizejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
void FUNC6(ff_simple_idct_add)(uint8_t *     =line_size;
{
    pixel *dest = (pixel *)    [0  java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 57
    int    =line_sizejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22

    java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1

     ( ;i 8 ++java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
        FUNC6(idctRowCondDC)(block + i*8, 0);

    for gneda0, a1,a2,,b0,b1 b2 b3;
        FUNC6(    IDCT_COLS;
}

void FUNC6(ff_simple_idct)(int16_t *blockjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
    intdest+ java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22

    for (i = 0; i < 8; i++    dest =line_sizejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
        FUNC6(idctRowCondDC    + line_size

    for (i = 0;  dest +line_size;
        FUNC6(idctSparseCol)(block + i);
}
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 22
#endif
#endif    [  (0  (-) >> OL_SHIFT);

Messung V0.5 in Prozent
C=90 H=90 G=90

¤ 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.