[xiph-commits] r11580 - trunk/speex/ti

jm at svn.xiph.org jm at svn.xiph.org
Thu Jun 15 05:18:32 PDT 2006


Author: jm
Date: 2006-06-15 05:18:28 -0700 (Thu, 15 Jun 2006)
New Revision: 11580

Modified:
   trunk/speex/ti/testenc-TI-C5x.c
   trunk/speex/ti/testenc-TI-C64x.c
Log:
Patch by Jim Crichton to compute delay properly in TI sample files.


Modified: trunk/speex/ti/testenc-TI-C5x.c
===================================================================
--- trunk/speex/ti/testenc-TI-C5x.c	2006-06-15 12:01:18 UTC (rev 11579)
+++ trunk/speex/ti/testenc-TI-C5x.c	2006-06-15 12:18:28 UTC (rev 11580)
@@ -184,22 +184,23 @@
    tmp=1;  /* Lowest */
    speex_encoder_ctl(st, SPEEX_SET_COMPLEXITY, &tmp);
 
-   speex_mode_query(&speex_nb_mode, SPEEX_MODE_FRAME_SIZE, &tmp);
-   fprintf (stderr, "frame size: %d\n", tmp);
-   skip_group_delay = tmp / 4;  /* algorithmic delay */
+   speex_encoder_ctl(st, SPEEX_GET_LOOKAHEAD, &skip_group_delay);
+   speex_decoder_ctl(dec, SPEEX_GET_LOOKAHEAD, &tmp);
+   skip_group_delay += tmp;
+   fprintf (stderr, "decoder lookahead = %d\n", skip_group_delay);
 
 #ifdef DECODE_ONLY
    bitsFile = "c:\\speextrunktest\\samples\\malebitsin.dat";
    fbits = fopen(bitsFile, "rb");
 #else
-   bitsFile = "c:\\speextrunktest\\samples\\malebits.dat";
+   bitsFile = "c:\\speextrunktest\\samples\\malebits5x.dat";
    fbits = fopen(bitsFile, "wb");
 #endif
 #if !defined(DECODE_ONLY) || defined(CHECK_RESULT)
    inFile = "c:\\speextrunktest\\samples\\male.snd";
    fin = fopen(inFile, "rb");
 #endif
-   outFile = "c:\\speextrunktest\\samples\\maleout.snd";
+   outFile = "c:\\speextrunktest\\samples\\maleout5x.snd";
    fout = fopen(outFile, "wb+");
  
    speex_bits_init(&bits);

Modified: trunk/speex/ti/testenc-TI-C64x.c
===================================================================
--- trunk/speex/ti/testenc-TI-C64x.c	2006-06-15 12:01:18 UTC (rev 11579)
+++ trunk/speex/ti/testenc-TI-C64x.c	2006-06-15 12:18:28 UTC (rev 11580)
@@ -146,22 +146,23 @@
    tmp=1;  /* Lowest */
    speex_encoder_ctl(st, SPEEX_SET_COMPLEXITY, &tmp);
 
-   speex_mode_query(&speex_nb_mode, SPEEX_MODE_FRAME_SIZE, &tmp);
-   fprintf (stderr, "frame size: %d\n", tmp);
-   skip_group_delay = tmp / 4;		/* 5ms algorithmic delay */
+   speex_encoder_ctl(st, SPEEX_GET_LOOKAHEAD, &skip_group_delay);
+   speex_decoder_ctl(dec, SPEEX_GET_LOOKAHEAD, &tmp);
+   skip_group_delay += tmp;
+   fprintf (stderr, "decoder lookahead = %d\n", skip_group_delay);
 
 #ifdef DECODE_ONLY
    bitsFile = "c:\\speextrunktest\\samples\\malebitsin.dat";
    fbits = fopen(bitsFile, "rb");
 #else
-   bitsFile = "c:\\speextrunktest\\samples\\malebits.dat";
+   bitsFile = "c:\\speextrunktest\\samples\\malebits6x.dat";
    fbits = fopen(bitsFile, "wb");
 #endif
 #if !defined(DECODE_ONLY) || defined(CHECK_RESULT)
    inFile = "c:\\speextrunktest\\samples\\male.snd";
    fin = fopen(inFile, "rb");
 #endif
-   outFile = "c:\\speextrunktest\\samples\\maleout.snd";
+   outFile = "c:\\speextrunktest\\samples\\maleout6x.snd";
    fout = fopen(outFile, "wb+");
  
    speex_bits_init(&bits);



More information about the commits mailing list