1 #include "common.h"
2 #include "encoder.h"
3 #include "config.h"
4 
5 
6 
7 
8 #ifdef DONTUSEINTERACTIVE
9 void
obtain_parameters(frame_params * fr_ps,int * psy,long unsigned int * num_samples,long unsigned int * num_samples_ml,char * original_file_name,char * encoded_file_name,IFF_AIFF * pcm_aiff_data,IFF_AIFF * pcm_aiff_data_ml,int * aiff,int * byte_per_sample,int * mat_mode,int * aug_mat_mode,int * cha_sw,int * aug_cha_sw,char * encoded_file_name_ext,int * bit_rate,char * encoded_file_name_mpg,int * dyn_cr,int * dyn_cr_LR,int * aug_dyn_cr,int * ancillaryUse,int * verbosity)10 obtain_parameters (frame_params * fr_ps,
11 		   int *psy,
12 		   long unsigned int *num_samples,
13 		   long unsigned int *num_samples_ml,
14 		   char *original_file_name,
15 		   char *encoded_file_name,
16 		   IFF_AIFF * pcm_aiff_data,
17 		   IFF_AIFF * pcm_aiff_data_ml,
18 		   int *aiff,
19 		   int *byte_per_sample,
20 		   int *mat_mode,
21 		   int *aug_mat_mode,
22 		   int *cha_sw,
23 		   int *aug_cha_sw,
24 		   char *encoded_file_name_ext,
25 		   int *bit_rate,
26 		   char *encoded_file_name_mpg,
27 		   int *dyn_cr,
28 		   int *dyn_cr_LR,
29 		   int *aug_dyn_cr, int *ancillaryUse, int *verbosity)
30 {
31   int j, bool, max_rate, max_rate_index;
32   long int i;
33   int tot_channels = 0;		/* 21/03/1995 JMZ Multimode */
34   char configuration[50];	/* 21/03/1995 JMZ Multimode */
35   char t[50];
36 
37   layer *info = fr_ps->header;
38 
39   *aiff = 0;			/* flag for AIFF-Soundfile */
40 
41   do {
42     printf ("Enter PCM input file name <required>: ");
43     fgets(original_file_name, sizeof(original_file_name), stdin);
44     if (original_file_name[0] == NULL_CHAR)
45       printf ("PCM input file name is required.\n");
46   } while (original_file_name[0] == NULL_CHAR);
47 
48   printf (">>> PCM input file name is: %s\n", original_file_name);
49 
50   if ((musicin = fopen (original_file_name, "rb")) == NULL) {
51     printf ("Could not find \"%s\".\n", original_file_name);
52     exit (1);
53   }
54 
55 /***************************************************************************/
56 /* 08/03/1995 Multi lingual extension JMZ                                  */
57 
58   printf ("Do you have multi lingual channels? (Y)es, (<N>)o: ");
59   fgets(multilingual_file_name, sizeof(multilingual_file_name), stdin);
60   if ((*multilingual_file_name == 'Y') || (multilingual_file_name[0] == 'y')) {
61     printf ("Enter multilingual input file name <%s.%s>: ", original_file_name,
62 	    DFLT_ML_EXT);
63     fgets(multilingual_file_name, sizeof(multilingual_file_name), stdin);
64     if (multilingual_file_name[0] == NULL_CHAR) {
65       printf ("Null char\n");
66       strcat (strcpy (multilingual_file_name, original_file_name), DFLT_ML_EXT);
67     }
68     if ((musicin_ml = fopen (multilingual_file_name, "rb")) == NULL) {
69       printf ("Could not find \"%s\".\n", multilingual_file_name);
70       exit (1);
71     }
72 
73     /*remplir fr_ps il y a au moins un multilingual */
74     if (aiff_read_headers (musicin_ml, pcm_aiff_data_ml, byte_per_sample) == 0) {
75       printf (">>> Using Audio IFF multilingual file headers\n");
76       info->multiling_ch = pcm_aiff_data_ml->numChannels;
77       printf (">>> Using %d multilingual channels\n", info->multiling_ch);
78       *num_samples_ml = pcm_aiff_data_ml->numChannels *
79 	pcm_aiff_data_ml->numSampleFrames;
80     } else {			/* Not using Audio IFF sound file headers. */
81 
82       printf
83 	("***WARNING: Could not read AIFF header - No MultiLingual coding!!\n");
84       info->multiling_ch = 0;
85     }
86   } else {
87     printf ("no multi lingual coding!!\n");
88     info->multiling_ch = 0;
89   }
90 
91 /* 08/03/1995 Multi lingual extension JMZ                                  */
92 /***************************************************************************/
93 
94   printf ("Enter MPEG encoded output file name <%s%s>: ",
95 	  original_file_name, DFLT_EXT);
96 
97   fgets(encoded_file_name, sizeof(encoded_file_name), stdin);
98 
99   if (encoded_file_name[0] == NULL_CHAR) {
100     strcat (strcpy (encoded_file_name_ext, original_file_name), DFLT_EXT_EXT);
101     strcat (strcpy (encoded_file_name, original_file_name), DFLT_EXT);
102     strcat (strcpy (encoded_file_name_mpg, encoded_file_name), DFLT_EXT);
103   } else {
104     strcat (strcpy (encoded_file_name_ext, encoded_file_name), DFLT_EXT_EXT);
105     strcat (encoded_file_name, DFLT_EXT);
106     strcat (strcpy (encoded_file_name_mpg, encoded_file_name), DFLT_EXT);
107   }
108   printf (">>> MPEG encoded output file name is: %s\n", encoded_file_name);
109 
110   open_bit_stream_w (&bs, encoded_file_name, BUFFER_SIZE);
111 
112   if (aiff_read_headers (musicin, pcm_aiff_data, byte_per_sample) == 0) {
113 
114     *aiff = 1;
115     printf (">>> Using Audio IFF sound file headers\n");
116 
117 /**********************************************************/
118 /* 21/03/1995 JMZ Multimode */
119 
120     tot_channels = pcm_aiff_data->numChannels;
121     printf (">>> Using %d audio channels\n", tot_channels);
122 
123 	/********* 27/01/97, FdB, select LFE ********************/
124     if (tot_channels > 1) {
125       printf ("Do you want to use LFE coding? (y/<n>) ");
126       fgets(t, sizeof(t), stdin);
127       if ((*t == 'y') || (*t == 'Y')) {
128 	printf (">>> LFE coding is used.\n");
129 	info->lfe = 1;
130       } else {
131 	printf (">>> No LFE coding.\n");
132 	info->lfe = 0;
133       }
134     }
135     if (tot_channels - info->lfe == 5) {
136       fr_ps->stereomc = 3;
137       fr_ps->stereoaug = 0;
138       fr_ps->lfe_pos = 3;
139       printf ("Which configuration do you want to use?\n");
140       printf ("Available: 3/2 (<1>), 3/0 + 2/0 (2): ");
141       fgets(configuration, sizeof(configuration), stdin);
142       switch (*configuration) {
143       case '1':
144 	info->center = 1;
145 	info->surround = 2;
146 	fr_ps->config = 320;
147 	printf (">>> Using 3/2 configuration.\n");
148 	break;
149       case '2':
150 	info->center = 1;
151 	info->surround = 3;
152 	fr_ps->config = 302;
153 	printf (">>> Using 3/0 + 2/0 configuration.\n");
154 	break;
155       default:
156 	info->center = 1;
157 	info->surround = 2;
158 	fr_ps->config = 320;
159 	printf (">>> Using default 3/2 configuration.\n");
160 	break;
161       }
162     } else if (tot_channels - info->lfe == 4) {
163       fr_ps->stereomc = 2;
164       fr_ps->stereoaug = 0;
165       printf ("Which configuration do you want to use?\n");
166       printf ("Available: 3/1 (<1>), 2/2 (2), 2/0 + 2/0 (3): ");
167       fgets(configuration, sizeof(configuration), stdin);
168       switch (*configuration) {
169       case '1':
170 	info->center = 1;
171 	info->surround = 1;
172 	fr_ps->config = 310;
173 	fr_ps->lfe_pos = 3;
174 	printf (">>> Using 3/1 configuration.\n");
175 	break;
176       case '2':
177 	info->center = 0;
178 	info->surround = 2;
179 	fr_ps->config = 220;
180 	fr_ps->lfe_pos = 2;
181 	printf (">>> Using 2/2 configuration.\n");
182 	break;
183       case '3':
184 	info->center = 0;
185 	info->surround = 3;
186 	fr_ps->config = 202;
187 	fr_ps->lfe_pos = 2;
188 	printf (">>> Using 2/0 + 2/0 configuration.\n");
189 	break;
190       default:
191 	info->center = 1;
192 	info->surround = 1;
193 	fr_ps->config = 310;
194 	fr_ps->lfe_pos = 3;
195 	printf (">>> Using default 3/1 configuration.\n");
196 	break;
197       }
198     } else if (tot_channels - info->lfe == 3) {
199       fr_ps->stereoaug = 0;
200       printf ("Which configuration do you want to use?\n");
201       printf ("Available: 3/0 (<1>), 2/1 (2), 1/0 + 2/0 (3): ");
202       fgets(configuration, sizeof(configuration), stdin);
203       switch (*configuration) {
204       case '1':
205 	info->center = 1;
206 	info->surround = 0;
207 	fr_ps->config = 300;
208 	fr_ps->stereomc = 1;
209 	fr_ps->lfe_pos = 3;
210 	printf (">>> Using 3/0 configuration.\n");
211 	break;
212       case '2':
213 	info->center = 0;
214 	info->surround = 1;
215 	fr_ps->config = 210;
216 	fr_ps->stereomc = 1;
217 	fr_ps->lfe_pos = 2;
218 	printf (">>> Using 2/1 configuration.\n");
219 	break;
220       case '3':
221 	info->center = 0;
222 	info->surround = 3;
223 	fr_ps->config = 102;
224 	fr_ps->stereomc = 2;
225 	fr_ps->lfe_pos = 1;
226 	printf (">>> Using 1/0 + 2/0 configuration.\n");
227 	break;
228       default:
229 	info->center = 1;
230 	info->surround = 0;
231 	fr_ps->config = 300;
232 	fr_ps->stereomc = 1;
233 	fr_ps->lfe_pos = 3;
234 	printf (">>> Using default 3/0 configuration.\n");
235 	break;
236       }
237     } else if (tot_channels - info->lfe == 2) {
238       fr_ps->config = 200;
239       fr_ps->stereomc = 0;
240       fr_ps->stereoaug = 0;
241       fr_ps->lfe_pos = 2;
242     } else if (tot_channels - info->lfe == 1) {
243       if (info->lfe) {
244 	printf ("single channel plus LFE not supported.\n");
245 	exit (1);
246       }
247       fr_ps->config = 100;
248       fr_ps->stereomc = 0;
249       fr_ps->stereoaug = 0;
250     } else {
251       printf ("Channels = %d not supported.\n", tot_channels);
252       exit (1);
253     }
254 
255     aiff_check (original_file_name, pcm_aiff_data);
256 
257 /* 21/03/1995 JMZ Multimode */
258 /**********************************************************/
259 
260 
261     info->sampling_frequency = SmpFrqIndex ((long) pcm_aiff_data->sampleRate);
262     printf (">>> %.f Hz sampling frequency selected\n",
263 	    pcm_aiff_data->sampleRate);
264 
265     /* Determine number of samples in sound file */
266     *num_samples = pcm_aiff_data->numChannels * pcm_aiff_data->numSampleFrames;
267 
268     if (info->multiling_ch > 0) {
269       switch (SmpFrqIndex ((long) pcm_aiff_data_ml->sampleRate) -
270 	      info->sampling_frequency) {
271       case 16:
272 	printf ("MultiLingual is LSF coded.\n");
273 	info->multiling_fs = 1;
274 	break;
275       case 0:
276 	printf ("MultiLingual sample rate equals that of Audio.\n");
277 	info->multiling_fs = 0;
278 	break;
279       default:
280 	printf
281 	  ("***WARNING: MultiLingual sample rate does not equal (half) mc sample rate.\n");
282 	printf ("            No MultiLingual coding!!!\n");
283 	info->multiling_ch = 0;
284 	break;
285       }				/*switch */
286     }				/*if (ml_ch>0) */
287   } else {			/* Not using Audio IFF sound file headers. */
288     printf ("no multichannel coding!!\n");
289     fr_ps->stereomc = 0;
290     fr_ps->stereoaug = 0;
291     info->multiling_ch = 0;
292     printf ("What is the sampling frequency? <48000>[Hz]: ");
293     fgets(t, sizeof(t), stdin);
294     i = atol (t);
295     switch (i) {
296     case 48000:
297       info->sampling_frequency = 1;
298       printf (">>> %ld Hz sampling freq selected\n", i);
299       break;
300     case 44100:
301       info->sampling_frequency = 0;
302       printf (">>> %ld Hz sampling freq selected\n", i);
303       break;
304     case 32000:
305       info->sampling_frequency = 2;
306       printf (">>> %ld Hz sampling freq selected\n", i);
307       break;
308     default:
309       info->sampling_frequency = 1;
310       printf (">>> Default 48 kHz samp freq selected\n");
311     }
312 
313     if (fseek (musicin, 0, SEEK_SET) != 0) {
314       printf ("Could not seek to PCM sound data in \"%s\".\n",
315 	      original_file_name);
316       exit (1);
317     }
318 
319     /* Declare sound file to have "infinite" number of samples. */
320     *num_samples = MAX_U_32_NUM;
321   }
322 
323   printf ("Which layer do you want to use?\n");
324   printf ("Available: Layer (1), Layer (<2>): ");
325   fgets(t, sizeof(t), stdin);
326   switch (*t) {
327   case '1':
328     info->lay = 1;
329     printf (">>> Using Layer %s\n", t);
330     break;
331   case '2':
332     info->lay = 2;
333     printf (">>> Using Layer %s\n", t);
334     break;
335   default:
336     info->lay = 2;
337     printf (">>> Using default Layer 2\n");
338     break;
339   }
340 
341   printf ("Which mode do you want for the two front channels?\n");
342   printf ("Available: (<s>)tereo, (j)oint stereo, ");
343   printf ("(d)ual channel, s(i)ngle Channel, n(o)ne: ");
344   fgets(t, sizeof(t), stdin);
345   if (fr_ps->config < 200) {	/* compatible is mono */
346     info->mode = MPG_MD_MONO;
347     info->mode_ext = 0;
348     printf (">>> Using default mono mode\n");
349   } else
350     switch (*t) {
351     case 's':
352     case 'S':
353       info->mode = MPG_MD_STEREO;
354       info->mode_ext = 0;
355       printf (">>> Using mode %s\n", t);
356       break;
357     case 'j':
358     case 'J':
359       info->mode = MPG_MD_JOINT_STEREO;
360       printf (">>> Using mode %s\n", t);
361       break;
362     case 'd':
363     case 'D':
364       info->mode = MPG_MD_DUAL_CHANNEL;
365       info->mode_ext = 0;
366       printf (">>> Using mode %s\n", t);
367       break;
368     case 'i':
369     case 'I':
370       info->mode = MPG_MD_MONO;
371       info->mode_ext = 0;
372       printf (">>> Using mode %s\n", t);
373       break;
374     case 'o':
375     case 'O':
376       info->mode = MPG_MD_NONE;
377       info->mode_ext = 0;
378       printf (">>> Using mode %s\n", t);
379       break;
380     default:
381       info->mode = MPG_MD_STEREO;
382       info->mode_ext = 0;
383       printf (">>> Using default stereo mode\n");
384       break;
385     }
386 
387   *psy = DFLT_PSY;
388 
389   if (info->mode == MPG_MD_MONO)
390     max_rate_index = 10;
391   else
392     max_rate_index = 14;
393   /*    max_rate_index = 6; *//* 48 kHz => 96 kbps for multiple table testing */
394   max_rate = bitrate[info->lay - 1][max_rate_index];
395   printf ("What is the total bitrate? <%u>[kbps]: ", DFLT_BRT);
396   fgets(t, sizeof(t), stdin);
397   i = atol (t);
398   if (i == 0)
399     i = -10;
400   j = 0;
401   while (j <= max_rate_index) {
402     if (bitrate[info->lay - 1][j] == (int) i)
403       break;
404     j++;
405   }
406   if (j > max_rate_index) {
407     if (i < max_rate) {
408       if (DFLT_BRT <= max_rate) {
409 	i = DFLT_BRT;
410 	printf (">>> Using default %u kbps\n", DFLT_BRT);
411       } else {
412 	i = max_rate;
413 	printf (">>> Using max. bitrate %u kbps\n", max_rate);
414       }
415       for (j = 0; j < 15; j++)
416 	if (bitrate[info->lay - 1][j] == (int) i) {
417 	  info->bitrate_index = j;
418 	  break;
419 	}
420     } else {
421       info->ext_bit_stream_present = 1;
422       *bit_rate = i;
423       if (DFLT_BRT <= max_rate)
424 	i = DFLT_BRT;
425       else
426 	i = max_rate;
427       for (j = 0; j < 15; j++)
428 	if (bitrate[info->lay - 1][j] == (int) i) {
429 	  info->bitrate_index = j;
430 	  break;
431 	}
432       info->ext_length =
433 	((*bit_rate - i) * 144) / s_freq[info->sampling_frequency];
434       printf (">>> Bitrate = %d kbps\n", *bit_rate);
435     }
436   } else {
437     info->bitrate_index = j;
438     printf (">>> Bitrate = %d kbps\n", bitrate[info->lay - 1][j]);
439   }
440 
441   printf ("What type of de-emphasis should the decoder use?\n");
442   printf ("Available: (<n>)one, (5)0/15 microseconds, (c)citt j.17: ");
443   fgets(t, sizeof(t), stdin);
444   if (*t != 'n' && *t != '5' && *t != 'c') {
445     printf (">>> Using default no de-emphasis\n");
446     info->emphasis = 0;
447   } else {
448     if (*t == 'n')
449       info->emphasis = 0;
450     else if (*t == '5')
451       info->emphasis = 1;
452     else if (*t == 'c')
453       info->emphasis = 3;
454     printf (">>> Using de-emphasis %c\n", *t);
455   }
456 
457 /*  Start 2. Part changes for CD Ver 3.2; jsp; 22-Aug-1991 */
458 
459   printf ("Do you want to set the private bit? (y/<n>): ");
460   fgets(t, sizeof(t), stdin);
461   if (*t == 'y' || *t == 'Y')
462     info->extension = 1;
463   else
464     info->extension = 0;
465   if (info->extension)
466     printf (">>> Private bit set\n");
467   else
468     printf (">>> Private bit not set\n");
469 
470 /*  End changes for CD Ver 3.2; jsp; 22-Aug-1991 */
471 
472   printf ("Do you want error protection? (y/<n>): ");
473   fgets(t, sizeof(t), stdin);
474   if (*t == 'y' || *t == 'Y')
475     info->error_protection = TRUE;
476   else
477     info->error_protection = FALSE;
478   if (info->error_protection)
479     printf (">>> Error protection used\n");
480   else
481     printf (">>> Error protection not used\n");
482 
483 
484   printf ("Is the material copyrighted? (y/<n>): ");
485   fgets(t, sizeof(t), stdin);
486   if (*t == 'y' || *t == 'Y')
487     info->copyright = 1;
488   else
489     info->copyright = 0;
490   if (info->copyright)
491     printf (">>> Copyrighted material\n");
492   else
493     printf (">>> Material not copyrighted\n");
494 
495   printf ("Is this the original? (y/<n>): ");
496   fgets(t, sizeof(t), stdin);
497   if (*t == 'y' || *t == 'Y')
498     info->original = 1;
499   else
500     info->original = 0;
501   if (info->original)
502     printf (">>> Original material\n");
503   else
504     printf (">>> Material not original\n");
505 
506   /* Option for multichannel for matricing, 7/12/93,SR */
507   if (*aiff == 1) {
508     printf ("which kind of matrix do you want(<(-3, -3) = 0>;(-xx, -3) = 1;");
509     printf (" (-oo, -3) = 2; (-oo, -oo) = 3)  ");
510     fgets(t, sizeof(t), stdin);
511     if (strcmp (t, "") == 0)
512       info->matrix = 0;
513     else
514       info->matrix = atoi (t);
515     printf ("The matrix %d is chosen\n", info->matrix);
516     *mat_mode = info->matrix;
517 
518 
519     printf ("Do you want to have Channel-switching?(<y>/n) ");
520     fgets(t, sizeof(t), stdin);
521     if (*t == 'y' || *t == 'Y')
522       *cha_sw = *aug_cha_sw = 1;
523 
524     if (*cha_sw == 0 || info->matrix == 3) {
525       *cha_sw = 0;
526       printf ("Channel-switching is not used!\n");
527       printf ("Which mode of Channel-switching do you want? (not used) ");
528       fgets(t, sizeof(t), stdin);
529       printf ("CHA mode: %d\n", *cha_sw);
530     } else {
531       *cha_sw = 1;
532       printf ("Channel-switching is used\n");
533       do {
534 	printf ("Which mode of Channel-switching do you want? (-2 ... 7) ");
535 	fgets(t, sizeof(t), stdin);
536 	*cha_sw = atoi (t);
537 	printf ("CHA mode: %d\n", *cha_sw);
538 	if (fr_ps->config == 320)
539 	  bool = *cha_sw > 7;
540 	else if (fr_ps->config == 310 && info->matrix == 2)
541 	  bool = *cha_sw > 5;
542 	else if (fr_ps->config == 310)
543 	  bool = *cha_sw > 4;
544 	else if (fr_ps->config == 220)
545 	  bool = *cha_sw > 3;
546 	else if (fr_ps->config == 300 || fr_ps->config == 302
547 		 || fr_ps->config == 210)
548 	  bool = *cha_sw > 2;
549 	else
550 	  bool = *cha_sw > 0;
551 	if (bool)
552 	  printf
553 	    ("!!! Channel-switching mode %d cannot be used together with Configuration: %d !!!\n",
554 	     *cha_sw, fr_ps->config);
555       } while (bool);
556     }
557 
558       *aug_cha_sw = 0;
559 
560 	/********* 27/07/95, WtK , phantom coding ********************/
561     if ((fr_ps->stereomc > 0) && (info->center == 1)) {
562       printf
563 	("Do you want to use Phantom Coding of the Center signal? (y/<n>) ");
564       fgets(t, sizeof(t), stdin);
565       if ((*t == 'y') || (*t == 'Y')) {
566 	printf (">>> Phantom Coding is used.\n");
567 	fr_ps->phantom_c = 1;
568       } else {
569 	printf (">>> No Phantom Coding.\n");
570 	fr_ps->phantom_c = 0;
571       }
572     }
573 
574 	/********* 05/24/95, SR , dynamic cross_talk ********************/
575     printf ("Do you want to have Dynamic Crosstalk?(y/<n>) ");
576     fgets(t, sizeof(t), stdin);
577     if (*t == 'y') {
578       printf ("Dynamic Crosstalk is used!\n");
579       bool = 1;
580       do {
581 	printf ("Which mode of Dynamic Crosstalk do you want? (-1 ... 14) ");
582 	fgets(t, sizeof(t), stdin);
583 	*dyn_cr = atoi (t);
584 	printf ("DynX mode: %d\n", *dyn_cr);
585 	if (fr_ps->phantom_c && fr_ps->config == 320)
586 	  bool = ((*dyn_cr == 9) || (*dyn_cr == 10) || (*dyn_cr == 11)
587 		  || (*dyn_cr == 12) || (*dyn_cr == 14));
588 	else if (fr_ps->phantom_c
589 		 && ((fr_ps->config == 310) || (fr_ps->config == 220)))
590 	  bool = (*dyn_cr == 4);
591 	else
592 	  bool = 0;
593 	if (bool)
594 	  printf
595 	    ("!!! Dynamic Crosstalk mode %d cannot be used together with Phantom Coding !!!\n",
596 	     *dyn_cr);
597       } while (bool);
598 
599     } else {
600       *dyn_cr = 0;
601       printf ("Dynamic Crosstalk is not used\n");
602       printf ("Which mode of Dynamic Crosstalk do you want? (not used) ");
603       fgets(t, sizeof(t), stdin);
604       printf ("DynX mode: %d\n", *dyn_cr);
605     }
606     bool = 1;
607     do {
608       printf ("Value for dyn_cross_LR?(<0>/1) ");
609       fgets(t, sizeof(t), stdin);
610       *dyn_cr_LR = atoi (t);
611       bool = *dyn_cr_LR < -1 || *dyn_cr_LR > 1;
612 
613       if (bool)
614 	printf ("!!! dyn_cross_LR %d invalid value -1, 0 or 1 !!!\n",
615 		*dyn_cr_LR);
616     } while (bool);
617     printf ("dyn_cross_LR: %d\n", *dyn_cr_LR);
618 
619 	/********* 27/01/97, FdB, select prediction ********************/
620     if (fr_ps->stereomc > 0 && fr_ps->config != 202 && fr_ps->config != 102) {
621       printf ("Do you want to use MC prediction? (y/<n>) ");
622       fgets(t, sizeof(t), stdin);
623       if ((*t == 'y') || (*t == 'Y')) {
624 	printf (">>> MC prediction is used.\n");
625 	info->mc_prediction_on = 1;
626       } else {
627 	printf (">>> No MC prediction.\n");
628 	info->mc_prediction_on = 0;
629       }
630     }
631   }
632 
633   /* YBKim060695 ancillary */
634   printf ("Do you want to use ancillary part ? (y:<n>): ");
635   fgets(t, sizeof(t), stdin);
636   *ancillaryUse = (*t == 'y' || *t == 'Y');
637   printf ("Ancillary: %d\n", *ancillaryUse);
638 
639   printf ("How verbose would you like the output ? (0, <1>, 2, 3): ");
640   fgets(t, sizeof(t), stdin);
641   if (*t >= '0' && *t <= '3')
642     *verbosity = atoi (t);
643   else
644     *verbosity = DFLT_VERB;
645   printf ("Verbose level: %d\n", *verbosity);
646 
647   printf ("Do you wish to exit (last chance before encoding)? (y/<n>): ");
648   fgets(t, sizeof(t), stdin);
649   if (*t == 'y' || *t == 'Y')
650     exit (1);
651 }
652 
653 #endif
654