Changeset 10 for trunk/src/requant.c
- Timestamp:
- 08/12/06 16:35:51 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/requant.c
r6 r10 73 73 static mpc_uint32_t find_shift(double fval) 74 74 { 75 mpc_int64_t val = (mpc_int64_t)fval; 75 mpc_int64_t val = (mpc_int64_t)fval; 76 mpc_uint32_t ptr = 0; 76 77 if (val<0) val = -val; 77 mpc_uint32_t ptr = 0;78 78 while(val) {val>>=1;ptr++;} 79 79 … … 114 114 } 115 115 116 static void117 mpc_decoder_quantisierungsmodes(mpc_decoder *d) // conversion: index -> quantizer (bitstream reading)118 { // conversion: quantizer -> index (bitstream writing)119 mpc_int32_t Band = 0;120 mpc_int32_t i;121 122 do {123 d->Q_bit [Band] = 4;124 for ( i = 0; i < 16-1; i++ )125 d->Q_res [Band] [i] = i;126 d->Q_res [Band][i] = 17;127 Band++;128 } while ( Band < 11 );129 130 do {131 d->Q_bit [Band] = 3;132 for ( i = 0; i < 8-1; i++ )133 d->Q_res [Band] [i] = i;134 d->Q_res [Band] [i] = 17;135 Band++;136 } while ( Band < 23 );137 138 do {139 d->Q_bit [Band] = 2;140 for ( i = 0; i < 4-1; i++ )141 d->Q_res [Band] [i] = i;142 d->Q_res [Band] [i] = 17;143 Band++;144 } while ( Band < 32 );145 }146 147 116 void 148 117 mpc_decoder_initialisiere_quantisierungstabellen(mpc_decoder *d, double scale_factor) 149 118 { 150 mpc_decoder_quantisierungsmodes(d);151 119 mpc_decoder_scale_output(d, scale_factor); 152 120 }
Note: See TracChangeset
for help on using the changeset viewer.