Ignore:
Timestamp:
09/16/06 16:33:17 (18 years ago)
Author:
zorg
Message:

Various type size reductions
Removed some type warnings
Replaced char, uchar with mpc_int8_t and mpc_uint8_t

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/zorg/src/requant.c

    r10 r18  
    7171
    7272#ifdef MPC_FIXED_POINT
    73 static mpc_uint32_t find_shift(double fval)
     73static mpc_uint8_t find_shift(double fval)
    7474{
    7575        mpc_int64_t  val = (mpc_int64_t)fval;
     
    7878        while(val) {val>>=1;ptr++;}
    7979
    80         return ptr > 31 ? 0 : 31 - ptr;
     80        return ptr > 31 ? 0 : (mpc_uint8_t) 31 - ptr;
    8181}
    8282#endif
     
    8484/* F U N C T I O N S */
    8585
    86 #define SET_SCF(N,X) d->SCF[N] = MAKE_MPC_SAMPLE_EX(X,d->SCF_shift[N] = (unsigned char)find_shift(X));
     86#define SET_SCF(N,X) d->SCF[N] = MAKE_MPC_SAMPLE_EX(X,d->SCF_shift[N] = find_shift(X));
    8787
    8888void
    8989mpc_decoder_scale_output(mpc_decoder *d, double factor)
    9090{
    91     mpc_int32_t    n;
    92     double  f1;
    93     double  f2;
     91    mpc_uint8_t n;
     92    double      f1;
     93    double      f2;
    9494#ifndef MPC_FIXED_POINT
    9595        factor *= 1.0 / (double)(1<<(MPC_FIXED_POINT_SHIFT-1));
     
    107107
    108108    for ( n = 1; n <= 128; n++ ) {
    109                 SET_SCF((unsigned char)(1+n),f1);
    110                 SET_SCF((unsigned char)(1-n),f2);
     109                SET_SCF(1+n,f1);
     110                SET_SCF(1-n,f2);
    111111        f1 *=   0.83298066476582673961;
    112112        f2 *= 1/0.83298066476582673961;
Note: See TracChangeset for help on using the changeset viewer.