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

Diff of /xvidcore/src/encoder.h

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

revision 1.18.2.10, Sat Jan 25 22:44:50 2003 UTC revision 1.19, Wed Sep 4 20:56:52 2002 UTC
# Line 3  Line 3 
3   *  XVID MPEG-4 VIDEO CODEC   *  XVID MPEG-4 VIDEO CODEC
4   *  - Encoder header -   *  - Encoder header -
5   *   *
6     *  Copyright(C) 2002 Michael Militzer
7     *
8   *  This program is an implementation of a part of one or more MPEG-4   *  This program is an implementation of a part of one or more MPEG-4
9   *  Video tools as specified in ISO/IEC 14496-2 standard.  Those intending   *  Video tools as specified in ISO/IEC 14496-2 standard.  Those intending
10   *  to use this software module in hardware or software products are   *  to use this software module in hardware or software products are
# Line 27  Line 29 
29   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
30   *   *
31   ****************************************************************************/   ****************************************************************************/
 /*****************************************************************************  
  *  
  *  History  
  *  
  *  - 13.06.2002 Added legal header  
  *  - 22.08.2001 Added support for EXT_MODE encoding mode  
  *               support for EXTENDED API  
  *  - 22.08.2001 fixed bug in iDQtab  
  *  
  *  $Id$  
  *  
  ****************************************************************************/  
32    
33  #ifndef _ENCODER_H_  #ifndef _ENCODER_H_
34  #define _ENCODER_H_  #define _ENCODER_H_
# Line 46  Line 36 
36  #include "xvid.h"  #include "xvid.h"
37  #include "portab.h"  #include "portab.h"
38  #include "global.h"  #include "global.h"
39    #include "image/image.h"
40  #include "utils/ratecontrol.h"  #include "utils/ratecontrol.h"
41    
42  /*****************************************************************************  /*****************************************************************************
# Line 69  Line 60 
60  {  {
61          I_VOP = 0,          I_VOP = 0,
62          P_VOP = 1,          P_VOP = 1,
63          B_VOP = 2,          B_VOP = 2
         S_VOP = 3  
64  }  }
65  VOP_TYPE;  VOP_TYPE;
66    
# Line 92  Line 82 
82          uint32_t fincr;          uint32_t fincr;
83          uint32_t fbase;          uint32_t fbase;
84    
85          /* constants */  #ifdef _SMP
86          int global;          int num_threads;
87          int bquant_ratio;  #endif
         int bquant_offset;  
         int frame_drop_ratio;  
88    
89          int iMaxKeyInterval;  #ifdef BFRAMES
90          int max_bframes;          int max_bframes;
91    #endif
92    
93          /* rounding type; alternate 0-1 after each interframe */          /* rounding type; alternate 0-1 after each interframe */
94          /* 1 <= fixed_code <= 4          /* 1 <= fixed_code <= 4
# Line 110  Line 99 
99          uint32_t m_quant_type;          uint32_t m_quant_type;
100          uint32_t m_rounding_type;          uint32_t m_rounding_type;
101          uint32_t m_fcode;          uint32_t m_fcode;
         uint32_t m_quarterpel;  
         int m_reduced_resolution;       /* reduced_resolution_enable */  
102    
103          HINTINFO *hint;          HINTINFO *hint;
104    
105          int64_t m_stamp;          uint32_t m_seconds;
106  }          uint32_t m_ticks;
 MBParam;  
   
107    
 typedef struct  
 {  
         int iTextBits;  
         int iMvSum;  
         int iMvCount;  
         int kblks;  
         int mblks;  
         int ublks;  
         int gblks;  
108  }  }
109  Statistics;  MBParam;
110    
111    
112  typedef struct  typedef struct
# Line 141  Line 117 
117    
118          VOP_TYPE coding_type;          VOP_TYPE coding_type;
119          uint32_t rounding_type;          uint32_t rounding_type;
         uint32_t quarterpel;  
120          uint32_t fcode;          uint32_t fcode;
121          uint32_t bcode;          uint32_t bcode;
122    
123          uint32_t seconds;          uint32_t seconds;
124          uint32_t ticks;          uint32_t ticks;
         int64_t stamp;  
125    
126          IMAGE image;          IMAGE image;
127    
128          MACROBLOCK *mbs;          MACROBLOCK *mbs;
129    
         WARPPOINTS warp;                // as in bitstream  
         GMC_DATA gmc_data;              // common data for all MBs  
   
         Statistics sStat;  
130  }  }
131  FRAMEINFO;  FRAMEINFO;
132    
133    typedef struct
134    {
135            int iTextBits;
136            float fMvPrevSigma;
137            int iMvSum;
138            int iMvCount;
139            int kblks;
140            int mblks;
141            int ublks;
142    }
143    Statistics;
144    
145    
146    
147  typedef struct  typedef struct
148  {  {
149          MBParam mbParam;          MBParam mbParam;
150    
151          int iFrameNum;          int iFrameNum;
152            int iMaxKeyInterval;
153          int bitrate;          int bitrate;
154    
155          // images          // images
# Line 173  Line 157 
157          FRAMEINFO *current;          FRAMEINFO *current;
158          FRAMEINFO *reference;          FRAMEINFO *reference;
159    
160    #ifdef _DEBUG_PSNR
161          IMAGE sOriginal;          IMAGE sOriginal;
162    #endif
163          IMAGE vInterH;          IMAGE vInterH;
164          IMAGE vInterV;          IMAGE vInterV;
165          IMAGE vInterVf;          IMAGE vInterVf;
166          IMAGE vInterHV;          IMAGE vInterHV;
167          IMAGE vInterHVf;          IMAGE vInterHVf;
168    
169          IMAGE vGMC;  #ifdef BFRAMES
170            /* constants */
171            int global;
172            int bquant_ratio;
173            int frame_drop_ratio;
174    
175          /* image queue */          /* image queue */
176          int queue_head;          int queue_head;
# Line 199  Line 189 
189          IMAGE f_refhv;          IMAGE f_refhv;
190          int bframenum_dx50bvop;          int bframenum_dx50bvop;
191    
192            int last_pframe;
193            int last_sync;
194            int time_pp;
195          int m_framenum; /* debug frame num counter; unlike iFrameNum, does not reset at ivop */          int m_framenum; /* debug frame num counter; unlike iFrameNum, does not reset at ivop */
196    #endif
197    
198            Statistics sStat;
199          RateControl rate_control;          RateControl rate_control;
   
         float fMvPrevSigma;  
200  }  }
201  Encoder;  Encoder;
202    

Legend:
Removed from v.1.18.2.10  
changed lines
  Added in v.1.19

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