*** ChangeLog *** 0a1,7 > Tue Mar 7 01:55:10 1995 Jutta Degener (jutta@cs.tu-berlin.de) > > * Release 1.0 Patchlevel 7 > src/long_term.c: Yet another 16-bit overflow > src/toast.c: -C option to toast, cuts LPC time > src/gsm_option.c: corresponding LPC_CUT option to GSM library > *** INSTALL *** 1,7d0 < < /* < * Copyright 1992, 1993, 1994, by Jutta Degener and Carsten Bormann, < * Technische Universitaet Berlin. See the accompanying file "COPYRIGHT" < * for details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. < */ < 43,44c36,40 < If it doesn't sound anything like the original, read the manual. < If it still doesn't sound anything like the original, complain. --- > The GSM-encoded and -decoded audio should have the quality > of a good phone line. If the resulting audio is noisier than > your original, or if you hear compression artifacts, complain; > that's a bug in our software, not a bug in the GSM encoding > standard itself. 46d41 < 61d55 < 76,77c70,82 < Another possibility is the use of a lookup table; you can turn on < this feature by replacing -DUSE_FLOAT_MUL by -DUSE_TABLE_MUL. --- > If your machine does multiply integers fast enough, > leave USE_FLOAT_MUL undefined. The results should be the > same in both cases. > > On machines with fast floating point arithmetic, defining > both USE_FLOAT_MUL and FAST makes a run-time library > option available that will (in a few crucial places) use > ``native'' floating point operations rather than the bit-by-bit > defined ones of the GSM standard. If you use this fast > option, the outcome will not be bitwise identical to the > results prescribed by the standard, but it is compatible with > the standard encoding, and a user is unlikely to notice a > difference. 79d83 < If your machine does multiply integers fast, define neither. 81,82d84 < < 85,86c87,88 < Please direct bug reports to jutta@cs.tu-berlin.de and < cabo@cs.tu-berlin.de . --- > Please direct bug reports, questions, and comments to > jutta@cs.tu-berlin.de and cabo@informatik.uni-bremen.de. 92a95,99 > > -- > Copyright 1992, 1993, 1994, by Jutta Degener and Carsten Bormann, > Technische Universitaet Berlin. See the accompanying file "COPYRIGHT" > for details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. *** Makefile *** 1d0 < # 5,6d3 < # < 20a18,23 > # LTP_CUT = -DLTP_CUT > LTP_CUT = > ######### Define to enable the GSM library's long-term correlation > ######### approximation option---faster, but worse; works for > ######### both integer and floating point multiplications. > ######### This flag is still in the experimental stage. 121c124,125 < CFLAGS = $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(CCINC) -I$(INC) --- > CFLAGS = $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \ > $(CCINC) -I$(INC) *** README *** 1,6c1 < /* < * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische < * Universitaet Berlin. See the accompanying file "COPYRIGHT" for < * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. < */ < --- > 37a33,37 > > -- > Copyright 1992 by Jutta Degener and Carsten Bormann, Technische > Universitaet Berlin. See the accompanying file "COPYRIGHT" for > details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. *** inc/gsm.h *** 7c7 < /*$Header: /home/kbs/jutta/src/gsm/gsm-1.0/inc/RCS/gsm.h,v 1.8 1994/12/30 22:37:45 jutta Exp $*/ --- > /*$Header: /home/kbs/jutta/src/gsm/gsm-1.0/inc/RCS/gsm.h,v 1.9 1995/03/07 21:26:16 jutta Exp $*/ 24c24,26 < #undef GSM_P /* gnu stdio.h actually defines this... */ --- > #ifdef NeedFunctionPrototypes > # include /* for FILE * */ > #endif 25a28 > #undef GSM_P 32,35d34 < #ifdef NeedFunctionPrototypes < # include /* for FILE * */ < #endif < 47c46 < #define GSM_PATCHLEVEL 6 --- > #define GSM_PATCHLEVEL 7 52a52 > #define GSM_OPT_LTP_CUT 3 *** inc/private.h *** 7c7 < /*$Header: /home/kbs/jutta/src/gsm/gsm-1.0/inc/RCS/private.h,v 1.4 1994/11/28 20:25:03 jutta Exp $*/ --- > /*$Header: /home/kbs/jutta/src/gsm/gsm-1.0/inc/RCS/private.h,v 1.5 1995/03/07 21:26:16 jutta Exp $*/ 29a30 > word ltp_cut; /* long_term.c, LTP crosscorr. */ *** inc/toast.h *** 7c7 < /* $Header: /home/kbs/jutta/src/gsm/gsm-1.0/inc/RCS/toast.h,v 1.3 1994/11/28 20:25:03 jutta Exp $ */ --- > /* $Header: /home/kbs/jutta/src/gsm/gsm-1.0/inc/RCS/toast.h,v 1.4 1995/03/07 21:26:16 jutta Exp $ */ 48a49,51 > #ifdef O_BINARY > # define O_WRITE_EXCL O_WRONLY|O_CREAT|O_EXCL|O_BINARY > #else 49a53 > #endif *** man/gsm_option.3 *** 2c2 < .\" Copyright 1992 by Jutta Degener and Carsten Bormann, Technische --- > .\" Copyright 1992-1995 by Jutta Degener and Carsten Bormann, Technische 21c21 < Gsm is an implementation of the final draft GSM 06.10 --- > The gsm library is an implementation of the final draft GSM 06.10 29,30c29,30 < The second argument to gsm_option says what option should be < changed. --- > The second argument to gsm_option specifies what parameter > should be changed or queried. 32c32 < the option is not changed, just returned; --- > the current value of that parameter is returned; 40c40 < Change or query the GSM 06.10 implementation's verbosity level. --- > Verbosity level. 51c51 < Enable, disable or query a faster compression algorithm. --- > Faster compression algorithm. 56c56 < method. --- > method and does not noticably degrade audio quality. 62c62 < .nf --- > .fi 71c71 < This option can be changed any time during encoding or decoding. --- > This option can be set any time during encoding or decoding. 72a73,96 > .ne 5 > .sp > .PP > .I GSM_OPT_LTP_CUT > Enable, disable, or query the LTP cut-off optimization. > .br > .in+5 > During encoding, the search for the long-term correlation > lag forms the bottleneck of the algorithm. > The ltp-cut option enables an approximation that disregards most > of the samples for purposes of finding that correlation, > and hence speeds up the encoding at a noticable loss in quality. > .br > The value passed to > .br > .nf > gsm_option(handle, GSM_OPT_LTP_CUT, & value) > .fi > .br > turns the optimization on if nonzero, and off if zero. > .br > This option can be set any time during encoding > or decoding; it will only affect the encoding pass, not > the decoding. *** man/toast.1 *** 17c17 < .B \-cdfpvhualsF --- > .B \-cdfpvhualsFC 81a82,96 > .B \-C > (LTP cut-off) > Ignore most sample values when calculating the GSM long-term > correlation lag during encoding. > (The multiplications that do this are a bottleneck > of the algorithm.) > The resulting encoding process will not produce > exactly the same results as GSM 06.10 would, > but remains close enough to be compatible. > .br > The > .B \-C > option applies only to the encoder and is silently > ignored by the decoder. > .TP 138c153 < Please direct bug reports to jutta@cs.tu-berlin.de and cabo@cs.tu-berlin.de. --- > Please direct bug reports to jutta@cs.tu-berlin.de. *** src/gsm_create.c *** 7c7 < static char ident[] = "$Header: /home/kbs/jutta/src/gsm/gsm-1.0/src/RCS/gsm_create.c,v 1.2 1994/05/10 20:18:39 jutta Exp $"; --- > static char ident[] = "$Header: /home/kbs/jutta/src/gsm/gsm-1.0/src/RCS/gsm_create.c,v 1.3 1995/03/07 21:21:24 jutta Exp $"; 37,46d36 < < #ifdef USE_TABLE_MUL < < static int mul_init = 0; < if (!mul_init) { < mul_init = 1; < init_umul_table(); < } < < #endif *** src/gsm_option.c *** 7c7 < /* $Header: /home/kbs/jutta/src/gsm/gsm-1.0/src/RCS/gsm_option.c,v 1.1 1992/10/28 00:15:50 jutta Exp $ */ --- > /* $Header: /home/kbs/jutta/src/gsm/gsm-1.0/src/RCS/gsm_option.c,v 1.2 1995/03/07 21:21:24 jutta Exp $ */ 18a19,25 > case GSM_OPT_LTP_CUT: > #ifdef LTP_CUT > result = r->ltp_cut; > if (val) r->ltp_cut = *val; > #endif > break; > *** src/long_term.c *** 7c7 < /* $Header: /home/kbs/jutta/src/gsm/gsm-1.0/src/RCS/long_term.c,v 1.2 1994/05/10 20:18:42 jutta Exp $ */ --- > /* $Header: /home/kbs/jutta/src/gsm/gsm-1.0/src/RCS/long_term.c,v 1.4 1995/03/07 21:21:24 jutta Exp $ */ 17,47d16 < < #ifdef USE_TABLE_MUL < < unsigned int umul_table[ 513 ][ 256 ]; < < init_umul_table() < { < int i, j; < int n; < unsigned int * p = &umul_table[0][0]; < < for (i = 0; i < 513; i++) { < n = 0; < for (j = 0; j < 256; j++) { < *p++ = n; < n += i; < } < } < } < < # define umul(x9, x15) \ < ((int)(umul_table[x9][x15 & 0x0FF] + (umul_table[x9][ x15 >> 8 ] << 8))) < < # define table_mul(a, b) \ < ( (a < 0) ? ((b < 0) ? umul(-a, -b) : -umul(-a, b)) \ < : ((b < 0) ? -umul(a, -b) : umul(a, b))) < < #endif /* USE_TABLE_MUL */ < < < 54c23 < * This procedure computes the LTP gain (bc) and the LTP lag (Nc) --- > * This module computes the LTP gain (bc) and the LTP lag (Nc) 65,68c34,42 < /* This procedure exists in four versions. First, the two integer < * versions with or without table-multiplication (as one function); < * then, the two floating point versions (as another function), with < * or without scaling. --- > /* The next procedure exists in six versions. First two integer > * version (if USE_FLOAT_MUL is not defined); then four floating > * point versions, twice with proper scaling (USE_FLOAT_MUL defined), > * once without (USE_FLOAT_MUL and FAST defined, and fast run-time > * option used). Every pair has first a Cut version (see the -C > * option to toast or the LTP_CUT option to gsm_option()), then the > * uncut one. (For a detailed explanation of why this is altogether > * a bad idea, see Henry Spencer and Geoff Collyer, ``#ifdef Considered > * Harmful''.) 72a47,155 > #ifdef LTP_CUT > > static void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out), > > struct gsm_state * st, > > register word * d, /* [0..39] IN */ > register word * dp, /* [-120..-1] IN */ > word * bc_out, /* OUT */ > word * Nc_out /* OUT */ > ) > { > register int k, lambda; > word Nc, bc; > word wt[40]; > > longword L_result; > longword L_max, L_power; > word R, S, dmax, scal, best_k; > word ltp_cut; > > register word temp, wt_k; > > /* Search of the optimum scaling of d[0..39]. > */ > dmax = 0; > for (k = 0; k <= 39; k++) { > temp = d[k]; > temp = GSM_ABS( temp ); > if (temp > dmax) { > dmax = temp; > best_k = k; > } > } > temp = 0; > if (dmax == 0) scal = 0; > else { > assert(dmax > 0); > temp = gsm_norm( (longword)dmax << 16 ); > } > if (temp > 6) scal = 0; > else scal = 6 - temp; > assert(scal >= 0); > > /* Search for the maximum cross-correlation and coding of the LTP lag > */ > L_max = 0; > Nc = 40; /* index for the maximum cross-correlation */ > wt_k = SASR(d[best_k], scal); > > for (lambda = 40; lambda <= 120; lambda++) { > L_result = (longword)wt_k * dp[best_k - lambda]; > if (L_result > L_max) { > Nc = lambda; > L_max = L_result; > } > } > *Nc_out = Nc; > L_max <<= 1; > > /* Rescaling of L_max > */ > assert(scal <= 100 && scal >= -100); > L_max = L_max >> (6 - scal); /* sub(6, scal) */ > > assert( Nc <= 120 && Nc >= 40); > > /* Compute the power of the reconstructed short term residual > * signal dp[..] > */ > L_power = 0; > for (k = 0; k <= 39; k++) { > > register longword L_temp; > > L_temp = SASR( dp[k - Nc], 3 ); > L_power += L_temp * L_temp; > } > L_power <<= 1; /* from L_MULT */ > > /* Normalization of L_max and L_power > */ > > if (L_max <= 0) { > *bc_out = 0; > return; > } > if (L_max >= L_power) { > *bc_out = 3; > return; > } > > temp = gsm_norm( L_power ); > > R = SASR( L_max << temp, 16 ); > S = SASR( L_power << temp, 16 ); > > /* Coding of the LTP gain > */ > > /* Table 4.3a must be used to obtain the level DLB[i] for the > * quantization of the LTP gain b to get the coded version bc. > */ > for (bc = 0; bc <= 2; bc++) if (R <= gsm_mult(S, gsm_DLB[bc])) break; > *bc_out = bc; > } > > #endif /* LTP_CUT */ > 123,127c206 < # ifdef USE_TABLE_MUL < # define STEP(k) (table_mul(wt[k], dp[k - lambda])) < # else < # define STEP(k) (wt[k] * dp[k - lambda]) < # endif --- > # define STEP(k) (longword)wt[k] * dp[k - lambda] 211a291,470 > #ifdef LTP_CUT > > static void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out), > struct gsm_state * st, /* IN */ > register word * d, /* [0..39] IN */ > register word * dp, /* [-120..-1] IN */ > word * bc_out, /* OUT */ > word * Nc_out /* OUT */ > ) > { > register int k, lambda; > word Nc, bc; > word ltp_cut; > > float wt_float[40]; > float dp_float_base[120], * dp_float = dp_float_base + 120; > > longword L_max, L_power; > word R, S, dmax, scal; > register word temp; > > /* Search of the optimum scaling of d[0..39]. > */ > dmax = 0; > > for (k = 0; k <= 39; k++) { > temp = d[k]; > temp = GSM_ABS( temp ); > if (temp > dmax) dmax = temp; > } > > temp = 0; > if (dmax == 0) scal = 0; > else { > assert(dmax > 0); > temp = gsm_norm( (longword)dmax << 16 ); > } > > if (temp > 6) scal = 0; > else scal = 6 - temp; > > assert(scal >= 0); > ltp_cut = (longword)SASR(dmax, scal) * st->ltp_cut / 100; > > > /* Initialization of a working array wt > */ > > for (k = 0; k < 40; k++) { > register word w = SASR( d[k], scal ); > if (w < 0 ? w > -ltp_cut : w < ltp_cut) { > wt_float[k] = 0.0; > } > else { > wt_float[k] = w; > } > } > for (k = -120; k < 0; k++) dp_float[k] = dp[k]; > > /* Search for the maximum cross-correlation and coding of the LTP lag > */ > L_max = 0; > Nc = 40; /* index for the maximum cross-correlation */ > > for (lambda = 40; lambda <= 120; lambda += 9) { > > /* Calculate L_result for l = lambda .. lambda + 9. > */ > register float *lp = dp_float - lambda; > > register float W; > register float a = lp[-8], b = lp[-7], c = lp[-6], > d = lp[-5], e = lp[-4], f = lp[-3], > g = lp[-2], h = lp[-1]; > register float E; > register float S0 = 0, S1 = 0, S2 = 0, S3 = 0, S4 = 0, > S5 = 0, S6 = 0, S7 = 0, S8 = 0; > > # undef STEP > # define STEP(K, a, b, c, d, e, f, g, h) \ > if ((W = wt_float[K]) != 0.0) { \ > E = W * a; S8 += E; \ > E = W * b; S7 += E; \ > E = W * c; S6 += E; \ > E = W * d; S5 += E; \ > E = W * e; S4 += E; \ > E = W * f; S3 += E; \ > E = W * g; S2 += E; \ > E = W * h; S1 += E; \ > a = lp[K]; \ > E = W * a; S0 += E; } else (a = lp[K]) > > # define STEP_A(K) STEP(K, a, b, c, d, e, f, g, h) > # define STEP_B(K) STEP(K, b, c, d, e, f, g, h, a) > # define STEP_C(K) STEP(K, c, d, e, f, g, h, a, b) > # define STEP_D(K) STEP(K, d, e, f, g, h, a, b, c) > # define STEP_E(K) STEP(K, e, f, g, h, a, b, c, d) > # define STEP_F(K) STEP(K, f, g, h, a, b, c, d, e) > # define STEP_G(K) STEP(K, g, h, a, b, c, d, e, f) > # define STEP_H(K) STEP(K, h, a, b, c, d, e, f, g) > > STEP_A( 0); STEP_B( 1); STEP_C( 2); STEP_D( 3); > STEP_E( 4); STEP_F( 5); STEP_G( 6); STEP_H( 7); > > STEP_A( 8); STEP_B( 9); STEP_C(10); STEP_D(11); > STEP_E(12); STEP_F(13); STEP_G(14); STEP_H(15); > > STEP_A(16); STEP_B(17); STEP_C(18); STEP_D(19); > STEP_E(20); STEP_F(21); STEP_G(22); STEP_H(23); > > STEP_A(24); STEP_B(25); STEP_C(26); STEP_D(27); > STEP_E(28); STEP_F(29); STEP_G(30); STEP_H(31); > > STEP_A(32); STEP_B(33); STEP_C(34); STEP_D(35); > STEP_E(36); STEP_F(37); STEP_G(38); STEP_H(39); > > if (S0 > L_max) { L_max = S0; Nc = lambda; } > if (S1 > L_max) { L_max = S1; Nc = lambda + 1; } > if (S2 > L_max) { L_max = S2; Nc = lambda + 2; } > if (S3 > L_max) { L_max = S3; Nc = lambda + 3; } > if (S4 > L_max) { L_max = S4; Nc = lambda + 4; } > if (S5 > L_max) { L_max = S5; Nc = lambda + 5; } > if (S6 > L_max) { L_max = S6; Nc = lambda + 6; } > if (S7 > L_max) { L_max = S7; Nc = lambda + 7; } > if (S8 > L_max) { L_max = S8; Nc = lambda + 8; } > > } > *Nc_out = Nc; > > L_max <<= 1; > > /* Rescaling of L_max > */ > assert(scal <= 100 && scal >= -100); > L_max = L_max >> (6 - scal); /* sub(6, scal) */ > > assert( Nc <= 120 && Nc >= 40); > > /* Compute the power of the reconstructed short term residual > * signal dp[..] > */ > L_power = 0; > for (k = 0; k <= 39; k++) { > > register longword L_temp; > > L_temp = SASR( dp[k - Nc], 3 ); > L_power += L_temp * L_temp; > } > L_power <<= 1; /* from L_MULT */ > > /* Normalization of L_max and L_power > */ > > if (L_max <= 0) { > *bc_out = 0; > return; > } > if (L_max >= L_power) { > *bc_out = 3; > return; > } > > temp = gsm_norm( L_power ); > > R = SASR( L_max << temp, 16 ); > S = SASR( L_power << temp, 16 ); > > /* Coding of the LTP gain > */ > > /* Table 4.3a must be used to obtain the level DLB[i] for the > * quantization of the LTP gain b to get the coded version bc. > */ > for (bc = 0; bc <= 2; bc++) if (R <= gsm_mult(S, gsm_DLB[bc])) break; > *bc_out = bc; > } > > #endif /* LTP_CUT */ > 375a635,710 > #ifdef LTP_CUT > > static void Cut_Fast_Calculation_of_the_LTP_parameters P5((st, > d,dp,bc_out,Nc_out), > struct gsm_state * st, /* IN */ > register word * d, /* [0..39] IN */ > register word * dp, /* [-120..-1] IN */ > word * bc_out, /* OUT */ > word * Nc_out /* OUT */ > ) > { > register int k, lambda; > register float wt_float; > word Nc, bc; > word wt_max, best_k, ltp_cut; > > float dp_float_base[120], * dp_float = dp_float_base + 120; > > register float L_result, L_max, L_power; > > wt_max = 0; > > for (k = 0; k < 40; ++k) { > if ( d[k] > wt_max) wt_max = d[best_k = k]; > else if (-d[k] > wt_max) wt_max = -d[best_k = k]; > } > > assert(wt_max >= 0); > wt_float = (float)wt_max; > > for (k = -120; k <= 0; ++k) dp_float[k] = (float)dp[k]; > > /* Search for the maximum cross-correlation and coding of the LTP lag > */ > L_max = 0; > Nc = 40; /* index for the maximum cross-correlation */ > > for (lambda = 40; lambda <= 120; lambda++) { > L_result = wt_float * dp_float[best_k - lambda]; > if (L_result > L_max) { > Nc = lambda; > L_max = L_result; > } > } > > *Nc_out = Nc; > if (L_max <= 0.) { > *bc_out = 0; > return; > } > > /* Compute the power of the reconstructed short term residual > * signal dp[..] > */ > dp_float -= Nc; > L_power = 0; > for (k = 0; k < 40; ++k) { > register float f = dp_float[k]; > L_power += f * f; > } > > if (L_max >= L_power) { > *bc_out = 3; > return; > } > > /* Coding of the LTP gain > * Table 4.3a must be used to obtain the level DLB[i] for the > * quantization of the LTP gain b to get the coded version bc. > */ > lambda = L_max / L_power * 32768.; > for (bc = 0; bc <= 2; ++bc) if (lambda <= gsm_DLB[bc]) break; > *bc_out = bc; > } > > #endif /* LTP_CUT */ 550c885,891 < Fast_Calculation_of_the_LTP_parameters( d, dp, bc, Nc ); --- > #if defined (LTP_CUT) > if (S->ltp_cut) > Cut_Fast_Calculation_of_the_LTP_parameters(S, > d, dp, bc, Nc); > else > #endif /* LTP_CUT */ > Fast_Calculation_of_the_LTP_parameters(d, dp, bc, Nc ); 551a893,897 > #endif /* FAST & USE_FLOAT_MUL */ > #ifdef LTP_CUT > if (S->ltp_cut) > Cut_Calculation_of_the_LTP_parameters(S, d, dp, bc, Nc); > else 553c899 < Calculation_of_the_LTP_parameters( d, dp, bc, Nc ); --- > Calculation_of_the_LTP_parameters(d, dp, bc, Nc); *** src/toast.c *** 7c7 < /* $Header: /home/kbs/jutta/src/gsm/gsm-1.0/src/RCS/toast.c,v 1.5 1994/11/29 00:55:54 jutta Exp $ */ --- > /* $Header: /home/kbs/jutta/src/gsm/gsm-1.0/src/RCS/toast.c,v 1.6 1995/03/07 21:21:24 jutta Exp $ */ 21a22 > int f_ltp_cut = 0; /* LTP cut-off margin (-C) */ 287c288 < * Generate a `code' name (foo.Z) from a given name. --- > * Generate a `code' name from a given name. 438c439 < for (f = alldescs; *f; f++) --- > for (f = alldescs; *f; f++) { 445a447 > } 529,530c531,533 < (void)gsm_option(r, GSM_OPT_FAST, &f_fast); < (void)gsm_option(r, GSM_OPT_VERBOSE, &f_verbose); --- > (void)gsm_option(r, GSM_OPT_FAST, &f_fast); > (void)gsm_option(r, GSM_OPT_VERBOSE, &f_verbose); > (void)gsm_option(r, GSM_OPT_LTP_CUT, &f_ltp_cut); 702c705 < "$Id: toast.c,v 1.5 1994/11/29 00:55:54 jutta Exp $" ); --- > "$Id: toast.c,v 1.6 1995/03/07 21:21:24 jutta Exp $" ); 707c710 < printf("Usage: %s [-fcpdhvaulsF] [files...]\n", progname); --- > printf("Usage: %s [-fcpdhvaulsFC] [files...]\n", progname); 722a726 > printf(" -C cutoff Ignore most samples during LTP\n"); 744a749 > extern char * optarg; 746c751 < parse_argv0( *av ); --- > parse_argv0(*av); 748,749c753 < while ((opt = getopt(ac, av, "fcdpvhuaslVF")) != EOF) < switch (opt) { --- > while ((opt = getopt(ac, av, "fcdpvhuaslVFC:")) != EOF) switch (opt) { 756c760 < --- > case 'C': f_ltp_cut = 100; break; 769a774 > usage: 771c776 < "Usage: %s [-fcpdhvuaslF] [files...] (-h for help)\n", --- > "Usage: %s [-fcpdhvuaslFC] [files...] (-h for help)\n", *** src/toast_audio.c *** 7c7 < /* $Header: /home/kbs/jutta/src/gsm/gsm-1.0/src/RCS/toast_audio.c,v 1.5 1994/11/29 00:55:54 jutta Exp $ */ --- > /* $Header: /home/kbs/jutta/src/gsm/gsm-1.0/src/RCS/toast_audio.c,v 1.6 1995/03/07 21:21:24 jutta Exp $ */ 67,68c67 < || get_u32( in, &enc ) < || fseek(in, (long)(len - 4*4), 1) < 0) { --- > || get_u32( in, &enc )) { 86a86,96 > > while (len > 4*4) > if (getc(in) == EOF) { > fprintf(stderr, > "%s: EOF in header of Sun audio file \"%s\";\n\ > Try one of -u, -a, -l instead (%s -h for help).\n", > progname, inname ? inname : "stdin", progname); > return -1; > } > else len--; >