]> Creatis software - gdcm.git/blob - src/gdcmmpeg2/src/mpeg2dec/mpeg2dec.c
add std::string Orientation::GetOrientation ( File *f ) method, that
[gdcm.git] / src / gdcmmpeg2 / src / mpeg2dec / mpeg2dec.c
1
2 /* mpeg2dec.c, main(), initialization, option processing                    */
3
4 /* Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved. */
5
6 /*
7  * Disclaimer of Warranty
8  *
9  * These software programs are available to the user without any license fee or
10  * royalty on an "as is" basis.  The MPEG Software Simulation Group disclaims
11  * any and all warranties, whether express, implied, or statuary, including any
12  * implied warranties or merchantability or of fitness for a particular
13  * purpose.  In no event shall the copyright-holder be liable for any
14  * incidental, punitive, or consequential damages of any kind whatsoever
15  * arising from the use of these programs.
16  *
17  * This disclaimer of warranty extends to the user of these programs and user's
18  * customers, employees, agents, transferees, successors, and assigns.
19  *
20  * The MPEG Software Simulation Group does not represent or warrant that the
21  * programs furnished hereunder are free of infringement of any third-party
22  * patents.
23  *
24  * Commercial implementations of MPEG-1 and MPEG-2 video, including shareware,
25  * are subject to royalty fees to patent holders.  Many of these patents are
26  * general enough such that they are unavoidable regardless of implementation
27  * design.
28  *
29  */
30
31 #include <stdio.h>
32 #include <stdlib.h>
33 #include <ctype.h>
34 #include <fcntl.h>
35
36 #define GLOBAL
37 #include "config.h"
38 #include "global.h"
39
40 /* private prototypes */
41 static int  video_sequence _ANSI_ARGS_((int *framenum));
42 static int  Decode_Bitstream _ANSI_ARGS_((void));
43 static int  Headers _ANSI_ARGS_((void));
44 static void Initialize_Sequence _ANSI_ARGS_((void));
45 static void Initialize_Decoder _ANSI_ARGS_((void));
46 static void Deinitialize_Sequence _ANSI_ARGS_((void));
47 static void Process_Options _ANSI_ARGS_((int argc, char *argv[]));
48
49
50 #if OLD
51 static int  Get_Val _ANSI_ARGS_((char *argv[]));
52 #endif
53
54 /* #define DEBUG */
55
56 static void Clear_Options();
57 #ifdef DEBUG
58 static void Print_Options();
59 #endif
60
61 int my_open(char *filename)
62 {
63   return open(filename,O_RDONLY|O_BINARY);
64 }
65 off_t my_seek(int infile, off_t offset,int whence)
66 {
67   return lseek(infile, offset, whence);
68 }
69 ssize_t my_read(int infile,void *buf,size_t count)
70 {
71   return read(infile,buf,count);
72 }
73 int my_close(int infile)
74 {
75   return close(infile);
76 }
77
78
79
80 #ifdef GDCM_BUILD_MPEG2DEC
81 int main(argc,argv)
82 int argc;
83 char *argv[];
84 {
85   int ret, code;
86   base.open_stream = my_open;
87   base.seek_stream = my_seek;
88   base.read_stream = my_read;
89   base.close_stream = my_close;
90
91   Clear_Options();
92
93   /* decode command line arguments */
94   Process_Options(argc,argv);
95
96 #ifdef DEBUG
97   Print_Options();
98 #endif
99
100   ld = &base; /* select base layer context */
101
102   /* open MPEG base layer bitstream file(s) */
103   /* NOTE: this is either a base layer stream or a spatial enhancement stream */
104 /*  if ((base.Infile=open(Main_Bitstream_Filename,O_RDONLY|O_BINARY))<0) */
105   base.Infile = ld->open_stream(Main_Bitstream_Filename);
106   if( base.Infile < 0 )
107   {
108     fprintf(stderr,"Base layer input file %s not found\n", Main_Bitstream_Filename);
109     exit(1);
110   }
111
112
113   if(base.Infile != 0)
114   {
115     Initialize_Buffer(); 
116   
117     if(Show_Bits(8)==0x47)
118     {
119       sprintf(Error_Text,"Decoder currently does not parse transport streams\n");
120       Error(Error_Text);
121     }
122
123     next_start_code();
124     code = Show_Bits(32);
125
126     switch(code)
127     {
128     case SEQUENCE_HEADER_CODE:
129       break;
130     case PACK_START_CODE:
131       System_Stream_Flag = 1;
132     case VIDEO_ELEMENTARY_STREAM:
133       System_Stream_Flag = 1;
134       break;
135     default:
136       sprintf(Error_Text,"Unable to recognize stream type\n");
137       Error(Error_Text);
138       break;
139     }
140
141     /*lseek(base.Infile, 0l, SEEK_SET);*/
142     ld->seek_stream(base.Infile,0l,SEEK_SET);
143     Initialize_Buffer(); 
144   }
145
146   if(base.Infile!=0)
147   {
148     /*lseek(base.Infile, 0l, SEEK_SET);*/
149     ld->seek_stream(base.Infile,0l,SEEK_SET);
150   }
151
152   Initialize_Buffer(); 
153
154   if(Two_Streams)
155   {
156     ld = &enhan; /* select enhancement layer context */
157
158     /*if ((enhan.Infile = open(Enhancement_Layer_Bitstream_Filename,O_RDONLY|O_BINARY))<0)*/
159     enhan.Infile = ld->open_stream(Enhancement_Layer_Bitstream_Filename);
160     if (enhan.Infile<0)
161     {
162       sprintf(Error_Text,"enhancment layer bitstream file %s not found\n",
163         Enhancement_Layer_Bitstream_Filename);
164
165       Error(Error_Text);
166     }
167
168     Initialize_Buffer();
169     ld = &base;
170   }
171
172   Initialize_Decoder();
173
174   ret = Decode_Bitstream();
175
176   /*close(base.Infile);*/
177   ld->close_stream(base.Infile);
178
179   if (Two_Streams)
180     /*close(enhan.Infile);*/
181     ld->close_stream(enhan.Infile);
182
183   return ret;
184 }
185 #endif /*GDCM_BUILD_MPEG2DEC*/
186
187 /* IMPLEMENTATION specific routines */
188 static void Initialize_Decoder()
189 {
190   int i;
191
192   /* Clip table */
193   if (!(Clip=(unsigned char *)malloc(1024)))
194     Error("Clip[] malloc failed\n");
195
196   Clip += 384;
197
198   for (i=-384; i<640; i++)
199     Clip[i] = (i<0) ? 0 : ((i>255) ? 255 : i);
200
201   /* IDCT */
202   if (Reference_IDCT_Flag)
203     Initialize_Reference_IDCT();
204   else
205     Initialize_Fast_IDCT();
206
207 }
208
209 /* mostly IMPLEMENTAION specific rouintes */
210 static void Initialize_Sequence()
211 {
212   int cc, size;
213   static int Table_6_20[3] = {6,8,12};
214
215   /* check scalability mode of enhancement layer */
216   if (Two_Streams && (enhan.scalable_mode!=SC_SNR) && (base.scalable_mode!=SC_DP))
217     Error("unsupported scalability mode\n");
218
219   /* force MPEG-1 parameters for proper decoder behavior */
220   /* see ISO/IEC 13818-2 section D.9.14 */
221   if (!base.MPEG2_Flag)
222   {
223     progressive_sequence = 1;
224     progressive_frame = 1;
225     picture_structure = FRAME_PICTURE;
226     frame_pred_frame_dct = 1;
227     chroma_format = CHROMA420;
228     matrix_coefficients = 5;
229   }
230
231   /* round to nearest multiple of coded macroblocks */
232   /* ISO/IEC 13818-2 section 6.3.3 sequence_header() */
233   mb_width = (horizontal_size+15)/16;
234   mb_height = (base.MPEG2_Flag && !progressive_sequence) ? 2*((vertical_size+31)/32)
235                                         : (vertical_size+15)/16;
236
237   Coded_Picture_Width = 16*mb_width;
238   Coded_Picture_Height = 16*mb_height;
239
240   /* ISO/IEC 13818-2 sections 6.1.1.8, 6.1.1.9, and 6.1.1.10 */
241   Chroma_Width = (chroma_format==CHROMA444) ? Coded_Picture_Width
242                                            : Coded_Picture_Width>>1;
243   Chroma_Height = (chroma_format!=CHROMA420) ? Coded_Picture_Height
244                                             : Coded_Picture_Height>>1;
245   
246   /* derived based on Table 6-20 in ISO/IEC 13818-2 section 6.3.17 */
247   block_count = Table_6_20[chroma_format-1];
248
249   for (cc=0; cc<3; cc++)
250   {
251     if (cc==0)
252       size = Coded_Picture_Width*Coded_Picture_Height;
253     else
254       size = Chroma_Width*Chroma_Height;
255
256     if (!(backward_reference_frame[cc] = (unsigned char *)malloc(size)))
257       Error("backward_reference_frame[] malloc failed\n");
258
259     if (!(forward_reference_frame[cc] = (unsigned char *)malloc(size)))
260       Error("forward_reference_frame[] malloc failed\n");
261
262     if (!(auxframe[cc] = (unsigned char *)malloc(size)))
263       Error("auxframe[] malloc failed\n");
264
265     if(Ersatz_Flag)
266       if (!(substitute_frame[cc] = (unsigned char *)malloc(size)))
267         Error("substitute_frame[] malloc failed\n");
268
269
270     if (base.scalable_mode==SC_SPAT)
271     {
272       /* this assumes lower layer is 4:2:0 */
273       if (!(llframe0[cc] = (unsigned char *)malloc((lower_layer_prediction_horizontal_size*lower_layer_prediction_vertical_size)/(cc?4:1))))
274         Error("llframe0 malloc failed\n");
275       if (!(llframe1[cc] = (unsigned char *)malloc((lower_layer_prediction_horizontal_size*lower_layer_prediction_vertical_size)/(cc?4:1))))
276         Error("llframe1 malloc failed\n");
277     }
278   }
279
280   /* SCALABILITY: Spatial */
281   if (base.scalable_mode==SC_SPAT)
282   {
283     if (!(lltmp = (short *)malloc(lower_layer_prediction_horizontal_size*((lower_layer_prediction_vertical_size*vertical_subsampling_factor_n)/vertical_subsampling_factor_m)*sizeof(short))))
284       Error("lltmp malloc failed\n");
285   }
286
287 #ifdef DISPLAY
288   if (Output_Type==T_X11)
289   {
290     Initialize_Display_Process("");
291     Initialize_Dither_Matrix();
292   }
293 #endif /* DISPLAY */
294
295 }
296
297 void Error(text)
298 char *text;
299 {
300   fprintf(stderr,text);
301   exit(1);
302 }
303
304 /* Trace_Flag output */
305 void Print_Bits(code,bits,len)
306 int code,bits,len;
307 {
308   int i;
309   for (i=0; i<len; i++)
310     printf("%d",(code>>(bits-1-i))&1);
311 }
312
313
314
315 /* option processing */
316 static void Process_Options(argc,argv)
317 int argc;                  /* argument count  */
318 char *argv[];              /* argument vector */
319 {
320   int i, LastArg, NextArg;
321
322   /* at least one argument should be present */
323   if (argc<2)
324   {
325     printf("\n%s, %s\n",Version,Author);
326     printf("Usage:  mpeg2decode {options}\n"
327 "Options: -b  file  main bitstream (base or spatial enhancement layer)\n"
328 "         -cn file  conformance report (n: level)\n"
329 "         -e  file  enhancement layer bitstream (SNR or Data Partitioning)\n"
330 "         -f        store/display interlaced video in frame format\n"
331 "         -g        concatenated file format for substitution method (-x)\n"
332 "         -in file  information & statistics report  (n: level)\n"
333 "         -l  file  file name pattern for lower layer sequence\n"
334 "                   (for spatial scalability)\n"
335 "         -on file  output format (0:YUV 1:SIF 2:TGA 3:PPM 4:X11 5:X11HiQ)\n"
336 "         -q        disable warnings to stderr\n"
337 "         -r        use double precision reference IDCT\n"
338 "         -t        enable low level tracing to stdout\n"
339 "         -u  file  print user_data to stdio or file\n"
340 "         -vn       verbose output (n: level)\n"
341 "         -x  file  filename pattern of picture substitution sequence\n\n"
342 "File patterns:  for sequential filenames, \"printf\" style, e.g. rec%%d\n"
343 "                 or rec%%d%%c for fieldwise storage\n"
344 "Levels:        0:none 1:sequence 2:picture 3:slice 4:macroblock 5:block\n\n"
345 "Example:       mpeg2decode -b bitstream.mpg -f -r -o0 rec%%d\n"
346 "         \n");
347     exit(0);
348   }
349
350
351   Output_Type = -1;
352   i = 1;
353
354   /* command-line options are proceeded by '-' */
355
356   while(i < argc)
357   {
358     /* check if this is the last argument */
359     LastArg = ((argc-i)==1);
360
361     /* parse ahead to see if another flag immediately follows current
362        argument (this is used to tell if a filename is missing) */
363     if(!LastArg)
364       NextArg = (argv[i+1][0]=='-');
365     else
366       NextArg = 0;
367
368     /* second character, [1], after '-' is the switch */
369     if(argv[i][0]=='-')
370     {
371       switch(toupper(argv[i][1]))
372       {
373         /* third character. [2], is the value */
374       case 'B':
375         Main_Bitstream_Flag = 1;
376
377         if(NextArg || LastArg)
378         {
379           printf("ERROR: -b must be followed the main bitstream filename\n");
380         }
381         else
382           Main_Bitstream_Filename = argv[++i]; 
383
384         break;
385
386
387       case 'C':
388
389 #ifdef VERIFY
390         Verify_Flag = atoi(&argv[i][2]); 
391
392         if((Verify_Flag < NO_LAYER) || (Verify_Flag > ALL_LAYERS))
393         {
394           printf("ERROR: -c level (%d) out of range [%d,%d]\n",
395             Verify_Flag, NO_LAYER, ALL_LAYERS);
396           exit(ERROR);
397         }
398 #else  /* VERIFY */
399         printf("This program not compiled for Verify_Flag option\n");
400 #endif /* VERIFY */
401         break;
402
403       case 'E':
404         Two_Streams = 1; /* either Data Partitioning (DP) or SNR Scalability enhancment */
405                    
406         if(NextArg || LastArg)
407         {
408           printf("ERROR: -e must be followed by filename\n");
409           exit(ERROR);
410         }
411         else
412           Enhancement_Layer_Bitstream_Filename = argv[++i]; 
413
414         break;
415
416
417       case 'F':
418         Frame_Store_Flag = 1;
419         break;
420
421       case 'G':
422         Big_Picture_Flag = 1;
423         break;
424
425
426       case 'I':
427 #ifdef VERIFY
428         Stats_Flag = atoi(&argv[i][2]); 
429 #else /* VERIFY */
430         printf("WARNING: This program not compiled for -i option\n");
431 #endif /* VERIFY */     
432         break;
433     
434       case 'L':  /* spatial scalability flag */
435         Spatial_Flag = 1;
436
437        if(NextArg || LastArg)
438        {
439          printf("ERROR: -l must be followed by filename\n");
440          exit(ERROR);
441        }
442        else
443          Lower_Layer_Picture_Filename = argv[++i]; 
444
445         break;
446
447       case 'O':
448   
449         Output_Type = atoi(&argv[i][2]); 
450   
451         if((Output_Type==4) || (Output_Type==5))
452           Output_Picture_Filename = "";  /* no need of filename */
453         else if(NextArg || LastArg)  
454         {
455           printf("ERROR: -o must be followed by filename\n");
456           exit(ERROR);
457         }
458         else
459         /* filename is separated by space, so it becomes the next argument */
460           Output_Picture_Filename = argv[++i]; 
461
462 #ifdef DISPLAY
463         if (Output_Type==T_X11HIQ)
464         {
465           hiQdither = 1;
466           Output_Type=T_X11;
467         }
468 #endif /* DISPLAY */
469         break;
470
471       case 'Q':
472         Quiet_Flag = 1;
473         break;
474
475       case 'R':
476         Reference_IDCT_Flag = 1;
477         break;
478     
479       case 'T':
480 #ifdef TRACE
481         Trace_Flag = 1;
482 #else /* TRACE */
483         printf("WARNING: This program not compiled for -t option\n");
484 #endif /* TRACE */
485         break;
486
487       case 'U':
488         User_Data_Flag = 1;
489
490       case 'V':
491 #ifdef VERBOSE
492         Verbose_Flag = atoi(&argv[i][2]); 
493 #else /* VERBOSE */
494         printf("This program not compiled for -v option\n");
495 #endif /* VERBOSE */
496         break;
497
498
499       case 'X':
500         Ersatz_Flag = 1;
501
502        if(NextArg || LastArg)
503        {
504          printf("ERROR: -x must be followed by filename\n"); 
505          exit(ERROR);
506        }
507        else
508         Substitute_Picture_Filename = argv[++i]; 
509
510         break;
511
512
513
514       default:
515         fprintf(stderr,"undefined option -%c ignored. Exiting program\n", 
516           argv[i][1]);
517
518         exit(ERROR);
519     
520       } /* switch() */
521     } /* if argv[i][0] == '-' */
522     
523     i++;
524
525     /* check for bitstream filename argument (there must always be one, at the very end
526      of the command line arguments */
527
528   } /* while() */
529
530
531   /* options sense checking */
532
533   if(Main_Bitstream_Flag!=1)
534   {
535     printf("There must be a main bitstream specified (-b filename)\n");
536   }
537
538   /* force display process to show frame pictures */
539   if((Output_Type==4 || Output_Type==5) && Frame_Store_Flag)
540     Display_Progressive_Flag = 1;
541   else
542     Display_Progressive_Flag = 0;
543
544 #ifdef VERIFY
545   /* parse the bitstream, do not actually decode it completely */
546   
547
548 #if 0
549   if(Output_Type==-1)
550   {
551     Decode_Layer = Verify_Flag;
552     printf("FYI: Decoding bitstream elements up to: %s\n", 
553       Layer_Table[Decode_Layer]);
554   }
555   else
556 #endif
557     Decode_Layer = ALL_LAYERS;
558
559 #endif /* VERIFY */
560
561   /* no output type specified */
562   if(Output_Type==-1)
563   {
564     Output_Type = 9; 
565     Output_Picture_Filename = "";
566   }
567
568
569 #ifdef DISPLAY
570   if (Output_Type==T_X11)
571   {
572     if(Frame_Store_Flag)
573       Display_Progressive_Flag = 1;
574     else
575       Display_Progressive_Flag = 0;
576
577     Frame_Store_Flag = 1; /* to avoid calling dither() twice */
578   }
579 #endif
580
581
582 }
583
584
585 #ifdef OLD
586 /* 
587    this is an old routine used to convert command line arguments
588    into integers 
589 */
590 static int Get_Val(argv)
591 char *argv[];
592 {
593   int val;
594
595   if (sscanf(argv[1]+2,"%d",&val)!=1)
596     return 0;
597
598   while (isdigit(argv[1][2]))
599     argv[1]++;
600
601   return val;
602 }
603 #endif
604
605
606
607 static int Headers()
608 {
609   int ret;
610
611   ld = &base;
612   
613
614   /* return when end of sequence (0) or picture
615      header has been parsed (1) */
616
617   ret = Get_Hdr();
618
619
620   if (Two_Streams)
621   {
622     ld = &enhan;
623     if (Get_Hdr()!=ret && !Quiet_Flag)
624       fprintf(stderr,"streams out of sync\n");
625     ld = &base;
626   }
627
628   return ret;
629 }
630
631
632
633 static int Decode_Bitstream()
634 {
635   int ret;
636   int Bitstream_Framenum;
637
638   Bitstream_Framenum = 0;
639
640   for(;;)
641   {
642
643 #ifdef VERIFY
644     Clear_Verify_Headers();
645 #endif /* VERIFY */
646
647     ret = Headers();
648     
649     if(ret==1)
650     {
651       ret = video_sequence(&Bitstream_Framenum);
652     }
653     else
654       return(ret);
655   }
656
657 }
658
659
660 static void Deinitialize_Sequence()
661 {
662   int i;
663
664   /* clear flags */
665   base.MPEG2_Flag=0;
666
667   for(i=0;i<3;i++)
668   {
669     free(backward_reference_frame[i]);
670     free(forward_reference_frame[i]);
671     free(auxframe[i]);
672
673     if (base.scalable_mode==SC_SPAT)
674     {
675      free(llframe0[i]);
676      free(llframe1[i]);
677     }
678   }
679
680   if (base.scalable_mode==SC_SPAT)
681     free(lltmp);
682
683 #ifdef DISPLAY
684   if (Output_Type==T_X11) 
685     Terminate_Display_Process();
686 #endif
687 }
688
689
690 static int video_sequence(Bitstream_Framenumber)
691 int *Bitstream_Framenumber;
692 {
693   int Bitstream_Framenum;
694   int Sequence_Framenum;
695   int Return_Value;
696
697   Bitstream_Framenum = *Bitstream_Framenumber;
698   Sequence_Framenum=0;
699
700   Initialize_Sequence();
701
702   /* decode picture whose header has already been parsed in 
703      Decode_Bitstream() */
704
705
706   Decode_Picture(Bitstream_Framenum, Sequence_Framenum);
707
708   /* update picture numbers */
709   if (!Second_Field)
710   {
711     Bitstream_Framenum++;
712     Sequence_Framenum++;
713   }
714
715   /* loop through the rest of the pictures in the sequence */
716   while ((Return_Value=Headers()))
717   {
718     Decode_Picture(Bitstream_Framenum, Sequence_Framenum);
719
720     if (!Second_Field)
721     {
722       Bitstream_Framenum++;
723       Sequence_Framenum++;
724     }
725   }
726
727   /* put last frame */
728   if (Sequence_Framenum!=0)
729   {
730     Output_Last_Frame_of_Sequence(Bitstream_Framenum);
731   }
732
733   Deinitialize_Sequence();
734
735 #ifdef VERIFY
736     Clear_Verify_Headers();
737 #endif /* VERIFY */
738
739   *Bitstream_Framenumber = Bitstream_Framenum;
740   return(Return_Value);
741 }
742
743
744
745 static void Clear_Options()
746 {
747   Verbose_Flag = 0;
748   Output_Type = 0;
749   Output_Picture_Filename = " ";
750   hiQdither  = 0;
751   Output_Type = 0;
752   Frame_Store_Flag = 0;
753   Spatial_Flag = 0;
754   Lower_Layer_Picture_Filename = " ";
755   Reference_IDCT_Flag = 0;
756   Trace_Flag = 0;
757   Quiet_Flag = 0;
758   Ersatz_Flag = 0;
759   Substitute_Picture_Filename  = " ";
760   Two_Streams = 0;
761   Enhancement_Layer_Bitstream_Filename = " ";
762   Big_Picture_Flag = 0;
763   Main_Bitstream_Flag = 0;
764   Main_Bitstream_Filename = " ";
765   Verify_Flag = 0;
766   Stats_Flag  = 0;
767   User_Data_Flag = 0; 
768 }
769
770
771 #ifdef DEBUG
772 static void Print_Options()
773 {
774   
775   printf("Verbose_Flag                         = %d\n", Verbose_Flag);
776   printf("Output_Type                          = %d\n", Output_Type);
777   printf("Output_Picture_Filename              = %s\n", Output_Picture_Filename);
778   printf("hiQdither                            = %d\n", hiQdither);
779   printf("Output_Type                          = %d\n", Output_Type);
780   printf("Frame_Store_Flag                     = %d\n", Frame_Store_Flag);
781   printf("Spatial_Flag                         = %d\n", Spatial_Flag);
782   printf("Lower_Layer_Picture_Filename         = %s\n", Lower_Layer_Picture_Filename);
783   printf("Reference_IDCT_Flag                  = %d\n", Reference_IDCT_Flag);
784   printf("Trace_Flag                           = %d\n", Trace_Flag);
785   printf("Quiet_Flag                           = %d\n", Quiet_Flag);
786   printf("Ersatz_Flag                          = %d\n", Ersatz_Flag);
787   printf("Substitute_Picture_Filename          = %s\n", Substitute_Picture_Filename);
788   printf("Two_Streams                          = %d\n", Two_Streams);
789   printf("Enhancement_Layer_Bitstream_Filename = %s\n", Enhancement_Layer_Bitstream_Filename);
790   printf("Big_Picture_Flag                     = %d\n", Big_Picture_Flag);
791   printf("Main_Bitstream_Flag                  = %d\n", Main_Bitstream_Flag);
792   printf("Main_Bitstream_Filename              = %s\n", Main_Bitstream_Filename);
793   printf("Verify_Flag                          = %d\n", Verify_Flag);
794   printf("Stats_Flag                           = %d\n", Stats_Flag);
795   printf("User_Data_Flag                       = %d\n", User_Data_Flag);
796
797 }
798 #endif
799