configfile.h
上传用户:sun1608
上传日期:2007-02-02
资源大小:6116k
文件大小:6k
源码类别:

流媒体/Mpeg4/MP4

开发平台:

Visual C++

  1. /*
  2. ***********************************************************************
  3. * COPYRIGHT AND WARRANTY INFORMATION
  4. *
  5. * Copyright 2001, International Telecommunications Union, Geneva
  6. *
  7. * DISCLAIMER OF WARRANTY
  8. *
  9. * These software programs are available to the user without any
  10. * license fee or royalty on an "as is" basis. The ITU disclaims
  11. * any and all warranties, whether express, implied, or
  12. * statutory, including any implied warranties of merchantability
  13. * or of fitness for a particular purpose.  In no event shall the
  14. * contributor or the ITU be liable for any incidental, punitive, or
  15. * consequential damages of any kind whatsoever arising from the
  16. * use of these programs.
  17. *
  18. * This disclaimer of warranty extends to the user of these programs
  19. * and user's customers, employees, agents, transferees, successors,
  20. * and assigns.
  21. *
  22. * The ITU does not represent or warrant that the programs furnished
  23. * hereunder are free of infringement of any third-party patents.
  24. * Commercial implementations of ITU-T Recommendations, including
  25. * shareware, may be subject to royalty fees to patent holders.
  26. * Information regarding the ITU-T patent policy is available from
  27. * the ITU Web site at http://www.itu.int.
  28. *
  29. * THIS IS NOT A GRANT OF PATENT RIGHTS - SEE THE ITU-T PATENT POLICY.
  30. ************************************************************************
  31. */
  32. /*!
  33.  ***********************************************************************
  34.  *  file
  35.  *     configfile.h
  36.  *  brief
  37.  *     Prototypes for configfile.c and definitions of used structures.
  38.  ***********************************************************************
  39.  */
  40. #ifndef _CONFIGFILE_H_
  41. #define _CONFIGFILE_H_
  42. #define DEFAULTCONFIGFILENAME "encoder.cfg"
  43. typedef struct {
  44.   char *TokenName;
  45.   void *Place;
  46.   int Type;
  47. } Mapping;
  48. InputParameters configinput;
  49. #ifdef INCLUDED_BY_CONFIGFILE_C
  50. Mapping Map[] = {
  51.     {"IntraPeriod",              &configinput.intra_period,            0},
  52.     {"FramesToBeEncoded",        &configinput.no_frames,               0},
  53.     {"QPFirstFrame",             &configinput.qp0,                     0},
  54.     {"QPRemainingFrame",         &configinput.qpN,                     0},
  55.     {"FrameSkip",                &configinput.jumpd,                   0},
  56.     {"MVResolution",             &configinput.mv_res,                  0},
  57.     {"UseHadamard",              &configinput.hadamard,                0},
  58.     {"SearchRange",              &configinput.search_range,            0},
  59.     {"NumberRefereceFrames",     &configinput.no_multpred,             0},
  60.     {"SourceWidth",              &configinput.img_width,               0},
  61.     {"SourceHeight",             &configinput.img_height,              0},
  62.     {"MbLineIntraUpdate",        &configinput.intra_upd,               0},
  63.     {"SliceMode",                &configinput.slice_mode,              0},
  64.     {"SliceArgument",            &configinput.slice_argument,          0},
  65.     {"UseConstrainedIntraPred",  &configinput.UseConstrainedIntraPred, 0},
  66.     {"InputFile",                &configinput.infile,                  1},
  67.     {"InputHeaderLength",        &configinput.infile_header,           0},
  68.     {"OutputFile",               &configinput.outfile,                 1},
  69.     {"ReconFile",                &configinput.ReconFile,               1},
  70.     {"TraceFile",                &configinput.TraceFile,               1},
  71.     {"NumberBFrames",            &configinput.successive_Bframe,       0},
  72.     {"QPBPicture",               &configinput.qpB,                     0},
  73.     {"SPPicturePeriodicity",     &configinput.sp_periodicity,          0},
  74.     {"QPSPPicture",              &configinput.qpsp,                    0},
  75.     {"QPSP2Picture",             &configinput.qpsp_pred,               0},
  76.     {"SymbolMode",               &configinput.symbol_mode,             0},
  77.     {"OutFileMode",              &configinput.of_mode,                 0},
  78.     {"PartitionMode",            &configinput.partition_mode,          0},
  79.     {"SequenceHeaderType",       &configinput.SequenceHeaderType,      0},
  80.     {"TRModulus",                &configinput.TRModulus,               0},
  81.     {"PicIdModulus",             &configinput.PicIdModulus,            0},
  82.     {"PictureTypeSequence",      &configinput.PictureTypeSequence,     1},
  83.     {"InterSearch16x16",         &configinput.InterSearch16x16,        0},
  84.     {"InterSearch16x8",          &configinput.InterSearch16x8 ,        0},
  85.     {"InterSearch8x16",          &configinput.InterSearch8x16,         0},
  86.     {"InterSearch8x8",           &configinput.InterSearch8x8 ,         0},
  87.     {"InterSearch8x4",           &configinput.InterSearch8x4,          0},
  88.     {"InterSearch4x8",           &configinput.InterSearch4x8,          0},
  89.     {"InterSearch4x4",           &configinput.InterSearch4x4,          0},
  90. #ifdef _FULL_SEARCH_RANGE_
  91.     {"RestrictSearchRange",      &configinput.full_search,             0},
  92. #endif
  93. #ifdef _ADAPT_LAST_GROUP_
  94.     {"LastFrameNumber",          &configinput.last_frame,              0},
  95. #endif
  96. #ifdef _CHANGE_QP_
  97.     {"ChangeQPP",                &configinput.qpN2,                    0},
  98.     {"ChangeQPB",                &configinput.qpB2,                    0},
  99.     {"ChangeQPStart",            &configinput.qp2start,                0},
  100. #endif
  101.     {"RDOptimization",           &configinput.rdopt,                   0},
  102.     {"LossRate",                 &configinput.LossRate,                0},
  103.     {"NumberOfDecoders",         &configinput.NoOfDecoders,            0},
  104. #ifdef _ADDITIONAL_REFERENCE_FRAME_
  105.     {"AdditionalReferenceFrame", &configinput.add_ref_frame,           0},
  106. #endif
  107. #ifdef _LEAKYBUCKET_
  108.     {"NumberofLeakyBuckets",     &configinput.NumberLeakyBuckets,      0},
  109.     {"LeakyBucketRateFile",     &configinput.LeakyBucketRateFile,     1},
  110.     {"LeakyBucketParamFile",    &configinput.LeakyBucketParamFile,    1},
  111. #endif
  112.     {NULL,                       NULL,                                -1}
  113. };
  114. #endif
  115. #ifndef INCLUDED_BY_CONFIGFILE_C
  116. extern Mapping Map[];
  117. #endif
  118. void Configure (int ac, char *av[]);
  119. #endif