--- divx4.h 2003/02/09 19:32:52 1.5 +++ divx4.h 2003/02/17 22:55:02 1.7 @@ -1,14 +1,38 @@ +/***************************************************************************** + * + * XVID MPEG-4 VIDEO CODEC + * - DivX 4.0 Compatibility API - + * + * This file is part of XviD, a free MPEG-4 video encoder/decoder + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: divx4.h,v 1.7 2003/02/17 22:55:02 edgomez Exp $ + * + ****************************************************************************/ + #ifndef _DIVX4_H_ #define _DIVX4_H_ #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif -/********************************************************************************* - * Decoder part * - *********************************************************************************/ +/***************************************************************************** + * Decoder part + ****************************************************************************/ /* decore commands */ #define DEC_OPT_MEMORY_REQS 0 @@ -128,9 +152,9 @@ -/********************************************************************************* - * Encoder part * - *********************************************************************************/ +/***************************************************************************** + * Encoder part + ****************************************************************************/ /** Structure passed as an argument when creating encoder. @@ -178,13 +202,13 @@ **/ typedef struct _ENC_FRAME_ { - void *image; /* the image frame to be encoded */ - void *bitstream; /* the buffer for encoded bitstream */ - int length; /* the length of the encoded bitstream */ - int colorspace; /* the format of image frame */ - int quant; /* quantizer for this frame; only used in VBR modes */ - int intra; /* force this frame to be intra/inter; only used in VBR 2-pass */ - void *mvs; /* optional pointer to array of motion vectors */ + void *image; /* the image frame to be encoded */ + void *bitstream; /* the buffer for encoded bitstream */ + int length; /* the length of the encoded bitstream */ + int colorspace; /* the format of image frame */ + int quant; /* quantizer for this frame; only used in VBR modes */ + int intra; /* force this frame to be intra/inter; only used in VBR 2-pass */ + void *mvs; /* optional pointer to array of motion vectors */ } ENC_FRAME; @@ -195,22 +219,19 @@ **/ typedef struct _ENC_RESULT_ { - int is_key_frame; /* the current frame is encoded as a key frame */ - int quantizer; /* the quantizer used for this frame */ - int texture_bits; /* amount of bits spent on coding DCT coeffs */ - int motion_bits; /* amount of bits spend on coding motion */ - int total_bits; /* sum of two previous fields */ + int is_key_frame; /* the current frame is encoded as a key frame */ + int quantizer; /* the quantizer used for this frame */ + int texture_bits; /* amount of bits spent on coding DCT coeffs */ + int motion_bits; /* amount of bits spend on coding motion */ + int total_bits; /* sum of two previous fields */ } ENC_RESULT; /* the prototype of the encore() - main encode engine entrance */ - int encore(void *handle, /* handle - the handle of the calling entity, must be unique */ - - int enc_opt, /* enc_opt - the option for encoding, see below */ - - void *param1, /* param1 - the parameter 1 (its actually meaning depends on enc_opt */ - - void *param2); /* param2 - the parameter 2 (its actually meaning depends on enc_opt */ + int encore(void *handle, /* handle - the handle of the calling entity, must be unique/ + int enc_opt, /* enc_opt - the option for encoding, see below */ + void *param1, /* param1 - the parameter 1 (its actually meaning depends on enc_opt */ + void *param2); /* param2 - the parameter 2 (its actually meaning depends on enc_opt */ /* encore options (the enc_opt parameter of encore()) */ #define ENC_OPT_INIT 0 /* initialize the encoder, return a handle */ @@ -253,4 +274,4 @@ } #endif -#endif /* _DIVX4_H_ */ +#endif /* _DIVX4_H_ */