Changeset 2998

Show
Ignore:
Timestamp:
12/04/99 12:52:26 (14 years ago)
Author:
ucacoxh
Message:

- Added SASR test to configure.in
- Added GSM defines to configure.in

Location:
rat/trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • rat/trunk/acconfig.h

    r2996 r2998  
    5050#undef HAVE_NETBSD_AUDIO 
    5151#undef HAVE_OSPREY_AUDIO 
    52 /* FreeBSD Speaker device */ 
    5352#undef HAVE_MACHINE_PCAUDIOIO_H 
     53 
     54/* GSM related */ 
     55#undef SASR 
     56#undef FAST 
     57#undef USE_FLOAT_MUL 
    5458 
    5559@BOTTOM@ 
  • rat/trunk/config.h.in

    r2996 r2998  
    6262#undef HAVE_NETBSD_AUDIO 
    6363#undef HAVE_OSPREY_AUDIO 
    64 /* FreeBSD Speaker device */ 
    6564#undef HAVE_MACHINE_PCAUDIOIO_H 
     65 
     66/* GSM related */ 
     67#undef SASR 
     68#undef FAST 
     69#undef USE_FLOAT_MUL 
    6670 
    6771/* Define if you have the <bstring.h> header file.  */ 
  • rat/trunk/configure

    r2997 r2998  
    35633563        fi 
    35643564fi 
     3565 
     3566# GSM flag checks 
     3567#----------------------------------------------------------------------------- 
     3568# Check if Signed arithmetic shift right (SASR).  If SASR then -1 >> 1 == 1. 
     3569# Return value from test program of zero indicates success. 
     3570#----------------------------------------------------------------------------- 
     3571echo $ac_n "checking signed arithmetic shift right""... $ac_c" 1>&6 
     3572echo "configure:3573: checking signed arithmetic shift right" >&5 
     3573if eval "test \"`echo '$''{'gsm_cv_sasr'+set}'`\" = set"; then 
     3574  echo $ac_n "(cached) $ac_c" 1>&6 
     3575else 
     3576  if test "$cross_compiling" = yes; then 
     3577    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } 
     3578else 
     3579  cat > conftest.$ac_ext <<EOF 
     3580#line 3581 "configure" 
     3581#include "confdefs.h" 
     3582int main() { return (-1 >> 1) != -1;} 
     3583EOF 
     3584if { (eval echo configure:3585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 
     3585then 
     3586  gsm_cv_sasr=yes 
     3587else 
     3588  echo "configure: failed program was:" >&5 
     3589  cat conftest.$ac_ext >&5 
     3590  rm -fr conftest* 
     3591  gsm_cv_sasr=no 
     3592fi 
     3593rm -fr conftest* 
     3594fi 
     3595 
     3596fi 
     3597 
     3598echo "$ac_t""$gsm_cv_sasr" 1>&6 
     3599if test $gsm_cv_sasr = yes ; then 
     3600        cat >> confdefs.h <<\EOF 
     3601#define SASR 1 
     3602EOF 
     3603 
     3604fi 
     3605#----------------------------------------------------------------------------- 
     3606# GSM Options, almost certainly not sensible on all platforms, performance 
     3607# tests in a configure script ? 
     3608#----------------------------------------------------------------------------- 
     3609cat >> confdefs.h <<\EOF 
     3610#define FAST 1 
     3611EOF 
     3612 
     3613cat >> confdefs.h <<\EOF 
     3614#define USE_FLOAT_MUL 1 
     3615EOF 
     3616 
    35653617 
    35663618 
  • rat/trunk/configure.in

    r2996 r2998  
    409409fi 
    410410 
     411# GSM flag checks 
     412#----------------------------------------------------------------------------- 
     413# Check if Signed arithmetic shift right (SASR).  If SASR then -1 >> 1 == 1. 
     414# Return value from test program of zero indicates success. 
     415#----------------------------------------------------------------------------- 
     416AC_CACHE_CHECK(signed arithmetic shift right, gsm_cv_sasr, 
     417        AC_TRY_RUN([int main() { return (-1 >> 1) != -1;}],  
     418                 gsm_cv_sasr=yes, 
     419                 gsm_cv_sasr=no)) 
     420if test $gsm_cv_sasr = yes ; then 
     421        AC_DEFINE(SASR) 
     422fi 
     423#----------------------------------------------------------------------------- 
     424# GSM Options, almost certainly not sensible on all platforms, performance 
     425# tests in a configure script ? 
     426#----------------------------------------------------------------------------- 
     427AC_DEFINE(FAST) 
     428AC_DEFINE(USE_FLOAT_MUL) 
     429 
    411430AC_CONFIG_HEADER(config.h) 
    412431 
  • rat/trunk/cx_gsm.c

    r2136 r2998  
    88#include "config_win32.h" 
    99#include "cx_gsm.h" 
     10 
     11#ifndef UNUSED 
     12#define UNUSED(x) (x) = (x) 
     13#endif 
    1014 
    1115#define saturate(x)     ((x) < MIN_WORD ? MIN_WORD : (x) > MAX_WORD ? MAX_WORD: (x)) 
     
    716720        Transformation_to_Log_Area_Ratios (LARc); 
    717721        Quantization_and_coding           (LARc); 
     722        UNUSED(S); 
    718723} 
    719724 
     
    20122017 
    20132018        Long_term_analysis_filtering( *bc, *Nc, dp, d, dpp, e ); 
     2019        UNUSED(S); 
    20142020} 
    20152021