android/ringlibsdl/project/jni/smpeg2-2.0.0/video/floatdct.cpp
void float_idct( short* block )
{
  int i, j, k, v;
  double partial_product;
  double tmp[64];

  for (i=0; i<8; i++)
    for (j=0; j<8; j++)
    {
      partial_product = 0.0;

      for (k=0; k<8; k++)
        partial_product+= c[k][j]*block[8*i+k];

      tmp[8*i+j] = partial_product;
    }

  /* Transpose operation is integrated into address mapping by switching 
     loop order of i and j */

  for (j=0; j<8; j++)
    for (i=0; i<8; i++)
    {
      partial_product = 0.0;

      for (k=0; k<8; k++)
        partial_product+= c[k][i]*tmp[8*k+j];

      v = (int) floor( partial_product + 0.5 );
      block[8*i+j] = (v<-256) ? -256 : ((v>255) ? 255 : v);
    }
}
/* perform IDCT matrix multiply for 8x8 coefficient block */
perform IDCT matrix multiply for 8x8 coefficient block
perform IDCT matrix multiply for 8x8 coefficient block
void float_idct( short* block )
{
  int i, j, k, v;
  double partial_product;
  double tmp[64];
  for (i=0; i<8; i++)
    for (j=0; j<8; j++)
    {
      partial_product = 0.0;
      for (k=0; k<8; k++)
        partial_product+= c[k][j]*block[8*i+k];
      tmp[8*i+j] = partial_product;
    }
  for (j=0; j<8; j++)
    for (i=0; i<8; i++)
    {
      partial_product = 0.0;
      for (k=0; k<8; k++)
        partial_product+= c[k][i]*tmp[8*k+j];
      v = (int) floor( partial_product + 0.5 );
      block[8*i+j] = (v<-256) ? -256 : ((v>255) ? 255 : v);
    }
}
void float_idct ( short * block ) { int i , j , k , v ; double partial_product ; double tmp [ 64 ] ; for ( i = 0 ; i < 8 ; i ++ ) for ( j = 0 ; j < 8 ; j ++ ) { partial_product = 0.0 ; for ( k = 0 ; k < 8 ; k ++ ) partial_product += c [ k ] [ j ] * block [ 8 * i + k ] ; tmp [ 8 * i + j ] = partial_product ; } for ( j = 0 ; j < 8 ; j ++ ) for ( i = 0 ; i < 8 ; i ++ ) { partial_product = 0.0 ; for ( k = 0 ; k < 8 ; k ++ ) partial_product += c [ k ] [ i ] * tmp [ 8 * k + j ] ; v = ( int ) floor ( partial_product + 0.5 ) ; block [ 8 * i + j ] = ( v < -256 ) ? -256 : ( ( v > 255 ) ? 255 : v ) ; } }
perform IDCT matrix multiply for 8x8 coefficient block
perform IDCT matrix multiply for 8x8 coefficient block
/* Transpose operation is integrated into address mapping by switching 
     loop order of i and j */