Ignore:
Timestamp:
09/29/06 16:55:39 (18 years ago)
Author:
r2d
Message:
  • added libmpcenc and a common directory
  • can compile libmpcenc and libmpcpsy don't know about linking
Location:
mppenc/branches/r2d/libmpcenc
Files:
1 added
1 moved

Legend:

Unmodified
Added
Removed
  • mppenc/branches/r2d/libmpcenc/quant.c

    r58 r64  
    1818 */
    1919
    20 #include "mppenc.h"
     20#include "libmpcenc.h"
     21
     22#include <math.h>
    2123
    2224/* V A R I A B L E S */
    2325float  __SCF    [128 + 6];   // tabulated scalefactors
     26#define SCF             ( __SCF + 6 )
    2427float  __invSCF [128 + 6];   // inverted scalefactors
     28#define invSCF  (__invSCF + 6)
    2529
    2630
     
    239243// Linear quantizer for a subband
    240244void
    241 QuantizeSubband ( unsigned int* qu_output, const float* input, const int res, float* errors )
     245QuantizeSubband ( unsigned int* qu_output, const float* input, const int res, float* errors, const int maxNsOrder )
    242246{
    243247    int    n;
     
    249253    float  signal;
    250254
    251     for ( n = 0; n < 36 - MAX_NS_ORDER; n++, input++, qu_output++ ) {
     255        for ( n = 0; n < 36 - maxNsOrder; n++, input++, qu_output++ ) {
    252256        // q = ftol(in), correct rounding
    253257        tmp   = *input * mult + 0xFF8000;
Note: See TracChangeset for help on using the changeset viewer.