Changeset 203 for libmpc/branches/r2d/mpcenc/mpcenc.c
- Timestamp:
- 02/08/07 14:29:39 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/branches/r2d/mpcenc/mpcenc.c
r201 r203 534 534 535 535 // Where is scf{R,L} [0...2] initialized ??? 536 scfL = SCF_Index_L [Band];537 scfR =SCF_Index_R [Band];536 scfL = e->SCF_Index_L [Band]; 537 scfR = e->SCF_Index_R [Band]; 538 538 if (tmp_L [0] > 0.) scfL [0] = IFLOORF (-12.6f * LOG10 (tmp_L [0]) + 57.8945021823f ); 539 539 if (tmp_L [1] > 0.) scfL [1] = IFLOORF (-12.6f * LOG10 (tmp_L [1]) + 57.8945021823f ); … … 669 669 const int* resR, 670 670 const SubbandFloatTyp* subx, 671 SubbandQuantTyp*subq )671 mpc_quantizer* subq ) 672 672 { 673 673 static float errorL [32] [36 + MAX_NS_ORDER]; … … 1500 1500 PCMDataTyp Main; // contains PCM data for 1600 samples 1501 1501 SubbandFloatTyp X [32]; // Subbandsamples as float() 1502 SubbandQuantTyp Q [32]; // Subband samples after quantization1503 1502 wave_t Wave; // contains WAV-files arguments 1504 1503 mpc_uint64_t AllSamplesRead = 0; // overall read Samples per channel … … 1518 1517 // initialize tables which must be initialized once and only once 1519 1518 1520 m.SCF_Index_L = (int*) SCF_Index_L;1521 m.SCF_Index_R = (int*) SCF_Index_R;1519 m.SCF_Index_L = (int*) e.SCF_Index_L; 1520 m.SCF_Index_R = (int*) e.SCF_Index_R; 1522 1521 1523 1522 Init_Psychoakustik (&m); … … 1672 1671 // you only get null samples at the output of the filterbank when the last frame contains zeroes 1673 1672 1674 memset ( Res_L, 0, sizeofRes_L );1675 memset ( Res_R, 0, sizeofRes_R );1673 memset ( e.Res_L, 0, sizeof e.Res_L ); 1674 memset ( e.Res_R, 0, sizeof e.Res_R ); 1676 1675 1677 1676 if ( !Silence || !OldSilence ) { … … 1681 1680 RaiseSMR (&m, m.Max_Band, &SMR ); // Minimum-operation on SBRs (full bandwidth) 1682 1681 if ( m.MS_Channelmode > 0 ) 1683 MS_LR_Entscheidung ( m.Max_Band, MS_Flag, &SMR, X ); // Selection of M/S- or L/R-Coding1682 MS_LR_Entscheidung ( m.Max_Band, e.MS_Flag, &SMR, X ); // Selection of M/S- or L/R-Coding 1684 1683 SCF_Extraktion (&m, &e, m.Max_Band, X ); // Extraction of the scalefactors and normalization of the subband samples 1685 1684 TransientenCalc ( Transient, TransientL, TransientR ); 1686 1685 if ( m.NS_Order > 0 ) { 1687 NS_Analyse (&m, m.Max_Band, MS_Flag, SMR, Transient ); // calculate possible ANS-Filter and the expected gain1686 NS_Analyse (&m, m.Max_Band, e.MS_Flag, SMR, Transient ); // calculate possible ANS-Filter and the expected gain 1688 1687 } 1689 1688 1690 Allocate ( m.Max_Band, Res_L, X[0].L,SCF_Index_L[0], m.SNR_comp_L, SMR.L, Power_L, Transient , m.PNS ); // allocate bits for left + right channel1691 Allocate ( m.Max_Band, Res_R, X[0].R,SCF_Index_R[0], m.SNR_comp_R, SMR.R, Power_R, Transient , m.PNS );1692 1693 Quantisierung (&m, m.Max_Band, Res_L, Res_R, X,Q ); // quantize samples1689 Allocate ( m.Max_Band, e.Res_L, X[0].L, e.SCF_Index_L[0], m.SNR_comp_L, SMR.L, Power_L, Transient , m.PNS ); // allocate bits for left + right channel 1690 Allocate ( m.Max_Band, e.Res_R, X[0].R, e.SCF_Index_R[0], m.SNR_comp_R, SMR.R, Power_R, Transient , m.PNS ); 1691 1692 Quantisierung (&m, m.Max_Band, e.Res_L, e.Res_R, X, e.Q ); // quantize samples 1694 1693 } 1695 1694 1696 1695 OldSilence = Silence; 1697 writeBitstream_SV8 ( &e, m.Max_Band , Q); // write SV8-Bitstream1696 writeBitstream_SV8 ( &e, m.Max_Band); // write SV8-Bitstream 1698 1697 1699 1698 if ( (int)(time (NULL) - T) >= 0 ) { // output
Note: See TracChangeset
for help on using the changeset viewer.