Subversion Repositories Kolibri OS

Rev

Rev 228 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 228 Rev 286
Line 218... Line 218...
218
 
218
 
219
/* 
219
/* 
220
 * init tables for layer-3 
220
 * init tables for layer-3 
Line -... Line 221...
-
 
221
 */
-
 
222
 
-
 
223
real hybridIn [2][SBLIMIT][SSLIMIT];
-
 
224
real hybridOut[2][SSLIMIT][SBLIMIT];
-
 
225
static real block[2][2][SBLIMIT*SSLIMIT] = { { { 0, } } };
-
 
226
static int blc[2]={0,0};
-
 
227
 
-
 
228
void reset_mpg()
-
 
229
{
-
 
230
  memset(block,0,sizeof(block));
-
 
231
  blc[0]=0;
-
 
232
  blc[1]=0;
-
 
233
  init_dct(); 
-
 
234
};
221
 */
235
 
222
 
236
 
223
#pragma warning(disable:4244)
237
#pragma warning(disable:4244)
224
void init_layer3(int down_sample_sblimit)
238
void init_layer3(int down_sample_sblimit)
Line 599... Line 613...
599
{
613
{
600
  unsigned char *pnt;
614
  unsigned char *pnt;
601
  int i,j,n=0,numbits=0;
615
  int i,j,n=0,numbits=0;
602
  unsigned int slen;
616
  unsigned int slen;
Line 603... Line 617...
603
 
617
 
604
  static unsigned char stab[3][6][4] = {
618
  static const unsigned char stab[3][6][4] = {
605
   { { 6, 5, 5,5 } , { 6, 5, 7,3 } , { 11,10,0,0} ,
619
   { { 6, 5, 5,5 } , { 6, 5, 7,3 } , { 11,10,0,0} ,
606
     { 7, 7, 7,0 } , { 6, 6, 6,3 } , {  8, 8,5,0} } ,
620
     { 7, 7, 7,0 } , { 6, 6, 6,3 } , {  8, 8,5,0} } ,
607
   { { 9, 9, 9,9 } , { 9, 9,12,6 } , { 18,18,0,0} ,
621
   { { 9, 9, 9,9 } , { 9, 9,12,6 } , { 18,18,0,0} ,
608
     {12,12,12,0 } , {12, 9, 9,6 } , { 15,12,9,0} } ,
622
     {12,12,12,0 } , {12, 9, 9,6 } , { 15,12,9,0} } ,
Line 1725... Line 1739...
1725
#else
1739
#else
1726
static void III_hybrid(real fsIn[SBLIMIT][SSLIMIT],real tsOut[SSLIMIT][SBLIMIT],
1740
static void III_hybrid(real fsIn[SBLIMIT][SSLIMIT],real tsOut[SSLIMIT][SBLIMIT],
1727
   int ch,struct gr_info_s *gr_info)
1741
   int ch,struct gr_info_s *gr_info)
1728
#endif
1742
#endif
1729
{
1743
{
1730
   static real block[2][2][SBLIMIT*SSLIMIT] = { { { 0, } } };
-
 
1731
   static int blc[2]={0,0};
-
 
1732
 
-
 
1733
   real *tspnt = (real *) tsOut;
1744
    real *tspnt = (real *) tsOut;
1734
   real *rawout1,*rawout2;
1745
   real *rawout1,*rawout2;
1735
   int bt,sb = 0;
1746
   int bt,sb = 0;
Line 1736... Line 1747...
1736
 
1747
 
Line 1780... Line 1791...
1780
       *rawout2++ = DOUBLE_TO_REAL(0.0);
1791
       *rawout2++ = DOUBLE_TO_REAL(0.0);
1781
     }
1792
     }
1782
   }
1793
   }
1783
}
1794
}
Line 1784... Line -...
1784
 
-
 
1785
real hybridIn [2][SBLIMIT][SSLIMIT];
-
 
1786
real hybridOut[2][SSLIMIT][SBLIMIT];
-
 
1787
 
1795
 
1788
int do_layer3(struct frame *fr,byte *pcm_sample,int *pcm_point)
1796
int do_layer3(struct frame *fr,byte *pcm_sample,int *pcm_point)
1789
{
1797
{
1790
  int gr, ch, ss,clip=0;
1798
  int gr, ch, ss,clip=0;
1791
  int scalefacs[2][39]; /* max 39 for short[13][3] mode, mixed: 38, long: 22 */
1799
  int scalefacs[2][39]; /* max 39 for short[13][3] mode, mixed: 38, long: 22 */