home *** CD-ROM | disk | FTP | other *** search
/ ST-Computer Leser 2002 January / STC_CD_01_2002.iso / APP / ANIPL218 / PROG / SLB / OPENDIVX / DECORE.H next >
C/C++ Source or Header  |  2001-01-19  |  3KB  |  85 lines

  1. /**************************************************************************
  2.  *                                                                        *
  3.  * This code has been developed by Adam Li. This software is an           *
  4.  * implementation of a part of one or more MPEG-4 Video tools as          *
  5.  * specified in ISO/IEC 14496-2 standard.  Those intending to use this    *
  6.  * software module in hardware or software products are advised that its  *
  7.  * use may infringe existing patents or copyrights, and any such use      *
  8.  * would be at such party's own risk.  The original developer of this     *
  9.  * software module and his/her company, and subsequent editors and their  *
  10.  * companies (including Project Mayo), will have no liability for use of  *
  11.  * this software or modifications or derivatives thereof.                 *
  12.  *                                                                        *
  13.  * Project Mayo gives users of the Codec a license to this software       *
  14.  * module or modifications thereof for use in hardware or software        *
  15.  * products claiming conformance to the MPEG-4 Video Standard as          *
  16.  * described in the Open DivX license.                                    *
  17.  *                                                                        *
  18.  * The complete Open DivX license can be found at                         *
  19.  * http://www.projectmayo.com/opendivx/license.php                        *
  20.  *                                                                        *
  21.  **************************************************************************/
  22. /**
  23. *  Copyright (C) 2001 - Project Mayo
  24.  *
  25.  * Adam Li
  26.  * Andrea Graziani
  27.  *
  28.  * DivX Advanced Research Center <darc@projectmayo.com>
  29. *
  30. **/
  31. // decore.h //
  32.  
  33. // This is the header file describing 
  34. // the entrance function of the encoder core
  35. // or the encore ...
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif 
  40.  
  41. #ifndef _DECORE_H_
  42. #define _DECORE_H_
  43.  
  44. // decore options
  45. #define DEC_OPT_INIT        32768                // 0x00008000
  46. #define DEC_OPT_RELEASE 65536                // 0x00010000
  47. #define DEC_OPT_SETPP        0x00020000    // 0x00020000
  48.  
  49. // decore return values
  50. #define DEC_OK                    0
  51. #define DEC_MEMORY            1
  52. #define DEC_BAD_FORMAT    2
  53.  
  54. typedef struct _DEC_PARAM_ 
  55. {
  56.     int x_dim; // x dimension of the frames to be decoded
  57.     int y_dim; // y dimension of the frames to be decoded
  58.     unsigned long color_depth;
  59. } DEC_PARAM;
  60.  
  61. typedef struct _DEC_FRAME_
  62. {
  63.     void *bmp; // the 24-bit decoded bitmap 
  64.     void *bitstream; // the decoder buffer
  65.     long length; // the lenght of the decoder stream
  66.     int render_flag;
  67. } DEC_FRAME;
  68.  
  69. typedef struct _DEC_SET_
  70. {
  71.     int postproc_level; // valid interval are [0..100]
  72. } DEC_SET;
  73.  
  74. // the prototype of the decore() - main decore engine entrance
  75. int decore(
  76.             unsigned long handle,    // handle    - the handle of the calling entity, must be unique
  77.             unsigned long dec_opt, // dec_opt - the option for docoding, see below
  78.             void *param1,    // param1    - the parameter 1 (it's actually meaning depends on dec_opt
  79.             void *param2);    // param2    - the parameter 2 (it's actually meaning depends on dec_opt
  80.  
  81. #endif // _DECORE_H_
  82. #ifdef __cplusplus
  83. }
  84. #endif 
  85.