[cvs] / xvidcore / src / divx4.h Repository:
ViewVC logotype

Diff of /xvidcore/src/divx4.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5, Sun Feb 9 19:32:52 2003 UTC revision 1.6, Sat Feb 15 15:22:17 2003 UTC
# Line 143  Line 143 
143  **/  **/
144          typedef struct _ENC_PARAM_          typedef struct _ENC_PARAM_
145          {          {
146                  int x_dim;                              /* the x dimension of the frames to be encoded */                  int x_dim;                              // the x dimension of the frames to be encoded
147                  int y_dim;                              /* the y dimension of the frames to be encoded */                  int y_dim;                              // the y dimension of the frames to be encoded
148                  float framerate;                /* the frame rate of the sequence to be encoded, in frames/second */                  float framerate;                // the frame rate of the sequence to be encoded, in frames/second
149                  int bitrate;                    /* the bitrate of the target encoded stream, in bits/second */                  int bitrate;                    // the bitrate of the target encoded stream, in bits/second
150                  int rc_period;                  /* the intended rate control averaging period */                  int rc_period;                  // the intended rate control averaging period
151                  int rc_reaction_period; /* the reaction period for rate control */                  int rc_reaction_period; // the reaction period for rate control
152                  int rc_reaction_ratio;  /* the ratio for down/up rate control */                  int rc_reaction_ratio;  // the ratio for down/up rate control
153                  int max_quantizer;              /* the upper limit of the quantizer */                  int max_quantizer;              // the upper limit of the quantizer
154                  int min_quantizer;              /* the lower limit of the quantizer */                  int min_quantizer;              // the lower limit of the quantizer
155                  int max_key_interval;   /* the maximum interval between key frames */                  int max_key_interval;   // the maximum interval between key frames
156                  int use_bidirect;               /* use bidirectional coding */                  int use_bidirect;               // use bidirectional coding
157                  int deinterlace;                /* fast deinterlace */                  int deinterlace;                // fast deinterlace
158                  int quality;                    /* the quality of compression ( 1 - fastest, 5 - best ) */                  int quality;                    // the quality of compression ( 1 - fastest, 5 - best )
159                  int obmc;                               /* flag to enable overlapped block motion compensation mode */                  int obmc;                               // flag to enable overlapped block motion compensation mode
160                  void *handle;                   /* will be filled by encore */                  void *handle;                   // will be filled by encore
161          }          }
162          ENC_PARAM;          ENC_PARAM;
163    
164    
165  /* encore2 */  // encore2
166    
167    
168  /**  /**
# Line 178  Line 178 
178  **/  **/
179          typedef struct _ENC_FRAME_          typedef struct _ENC_FRAME_
180          {          {
181                  void *image;                    /* the image frame to be encoded */                  void *image;                    // the image frame to be encoded
182                  void *bitstream;                /* the buffer for encoded bitstream */                  void *bitstream;                // the buffer for encoded bitstream
183                  int length;                             /* the length of the encoded bitstream */                  int length;                             // the length of the encoded bitstream
184                  int colorspace;                 /* the format of image frame */                  int colorspace;                 // the format of image frame
185                  int quant;                              /* quantizer for this frame; only used in VBR modes */                  int quant;                              // quantizer for this frame; only used in VBR modes
186                  int intra;                              /* force this frame to be intra/inter; only used in VBR 2-pass */                  int intra;                              // force this frame to be intra/inter; only used in VBR 2-pass
187                  void *mvs;                              /* optional pointer to array of motion vectors */                  void *mvs;                              // optional pointer to array of motion vectors
188          }          }
189          ENC_FRAME;          ENC_FRAME;
190    
# Line 195  Line 195 
195  **/  **/
196          typedef struct _ENC_RESULT_          typedef struct _ENC_RESULT_
197          {          {
198                  int is_key_frame;               /* the current frame is encoded as a key frame */                  int is_key_frame;               // the current frame is encoded as a key frame
199                  int quantizer;                  /* the quantizer used for this frame */                  int quantizer;                  // the quantizer used for this frame
200                  int texture_bits;               /* amount of bits spent on coding DCT coeffs */                  int texture_bits;               // amount of bits spent on coding DCT coeffs
201                  int motion_bits;                /* amount of bits spend on coding motion */                  int motion_bits;                // amount of bits spend on coding motion
202                  int total_bits;                 /* sum of two previous fields */                  int total_bits;                 // sum of two previous fields
203          }          }
204          ENC_RESULT;          ENC_RESULT;
205    
206  /* the prototype of the encore() - main encode engine entrance */  // the prototype of the encore() - main encode engine entrance
207          int encore(void *handle,        /* handle               - the handle of the calling entity, must be unique */          int encore(void *handle,        // handle               - the handle of the calling entity, must be unique
208    
209                             int enc_opt,         /* enc_opt              - the option for encoding, see below */                             int enc_opt,         // enc_opt              - the option for encoding, see below
210    
211                             void *param1,        /* param1               - the parameter 1 (its actually meaning depends on enc_opt */                             void *param1,        // param1               - the parameter 1 (its actually meaning depends on enc_opt
212    
213                             void *param2);       /* param2               - the parameter 2 (its actually meaning depends on enc_opt */                             void *param2);       // param2               - the parameter 2 (its actually meaning depends on enc_opt
214    
215  /* encore options (the enc_opt parameter of encore()) */  // encore options (the enc_opt parameter of encore())
216  #define ENC_OPT_INIT    0               /* initialize the encoder, return a handle */  #define ENC_OPT_INIT    0               // initialize the encoder, return a handle
217  #define ENC_OPT_RELEASE 1               /* release all the resource associated with the handle */  #define ENC_OPT_RELEASE 1               // release all the resource associated with the handle
218  #define ENC_OPT_ENCODE  2               /* encode a single frame */  #define ENC_OPT_ENCODE  2               // encode a single frame
219  #define ENC_OPT_ENCODE_VBR 3    /* encode a single frame, not using internal rate control algorithm */  #define ENC_OPT_ENCODE_VBR 3    // encode a single frame, not using internal rate control algorithm
220  #define ENC_OPT_VERSION 4  #define ENC_OPT_VERSION 4
221    
222  #define ENCORE_VERSION          20010807  #define ENCORE_VERSION          20010807
223    
224    
225    
226  /* return code of encore() */  // return code of encore()
227  #define ENC_FAIL                -1  #define ENC_FAIL                -1
228  #define ENC_OK                  0  #define ENC_OK                  0
229  #define ENC_MEMORY              1  #define ENC_MEMORY              1
# Line 253  Line 253 
253  }  }
254  #endif  #endif
255    
256  #endif                                                  /* _DIVX4_H_ */  #endif                                                  // _DIVX4_H_

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4