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

Diff of /xvidcore/src/global.h

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

revision 1.23, Mon Mar 22 22:36:23 2004 UTC revision 1.27, Sun Nov 28 15:18:21 2010 UTC
# Line 3  Line 3 
3   *  XVID MPEG-4 VIDEO CODEC   *  XVID MPEG-4 VIDEO CODEC
4   *  - Global definitions  -   *  - Global definitions  -
5   *   *
6   *  Copyright(C) 2002 Michael Militzer <isibaar@xvid.org>   *  Copyright(C) 2002-2010 Michael Militzer <michael@xvid.org>
7   *   *
8   *  This program is free software ; you can redistribute it and/or modify   *  This program is free software ; you can redistribute it and/or modify
9   *  it under the terms of the GNU General Public License as published by   *  it under the terms of the GNU General Public License as published by
# Line 48  Line 48 
48  #define MODE_DIRECT_NONE_MV     4  #define MODE_DIRECT_NONE_MV     4
49  #define MODE_DIRECT_NO4V        5  #define MODE_DIRECT_NO4V        5
50    
   
51  /*  /*
52   * vop coding types   * vop coding types
53   * intra, prediction, backward, sprite, not_coded   * intra, prediction, backward, sprite, not_coded
# Line 73  Line 72 
72          return xvid_type - 1;          return xvid_type - 1;
73  }  }
74    
   
75  typedef struct  typedef struct
76  {  {
77          int x;          int x;
# Line 81  Line 79 
79  }  }
80  VECTOR;  VECTOR;
81    
   
   
82  typedef struct  typedef struct
83  {  {
84          VECTOR duv[3];          VECTOR duv[3];
# Line 168  Line 164 
164  }  }
165  IMAGE;  IMAGE;
166    
   
167  typedef struct  typedef struct
168  {  {
169          uint32_t bufa;          uint32_t bufa;
# Line 182  Line 177 
177  }  }
178  Bitstream;  Bitstream;
179    
   
180  #define MBPRED_SIZE  15  #define MBPRED_SIZE  15
181    
   
182  typedef struct  typedef struct
183  {  {
184          /* decoder/encoder */          /* decoder/encoder */
# Line 210  Line 203 
203          int32_t sad8[4];                        /* SAD values for inter4v-VECTORs */          int32_t sad8[4];                        /* SAD values for inter4v-VECTORs */
204          int32_t sad16;                          /* SAD value for inter-VECTOR */          int32_t sad16;                          /* SAD value for inter-VECTOR */
205    
206            int32_t var16;                          /* Variance of the 16x16 luma block */
207            int32_t rel_var8[6];            /* Relative variances of the 8x8 sub-blocks */
208    
209          int dquant;          int dquant;
210          int cbp;          int cbp;
211    
212            /* lambda for these blocks */
213            int lambda[6];
214    
215          /* bframe stuff */          /* bframe stuff */
216    
217          VECTOR b_mvs[4];          VECTOR b_mvs[4];
# Line 221  Line 220 
220          VECTOR amv; /* average motion vectors from GMC  */          VECTOR amv; /* average motion vectors from GMC  */
221          int32_t mcsel;          int32_t mcsel;
222    
223            VECTOR  mvs_avg;      //CK average of field motion vectors
224    
225  /* This structure has become way to big! What to do? Split it up?   */  /* This structure has become way to big! What to do? Split it up?   */
226    
227  }  }
# Line 258  Line 259 
259  #define DIV_DIV(a,b)    (((a)>0) ? ((a)+((b)>>1))/(b) : ((a)-((b)>>1))/(b))  #define DIV_DIV(a,b)    (((a)>0) ? ((a)+((b)>>1))/(b) : ((a)-((b)>>1))/(b))
260  #define SWAP(_T_,A,B)    { _T_ tmp = A; A = B; B = tmp; }  #define SWAP(_T_,A,B)    { _T_ tmp = A; A = B; B = tmp; }
261    
262    static __inline uint32_t
263    isqrt(unsigned long n)
264    {
265        uint32_t c = 0x8000;
266        uint32_t g = 0x8000;
267    
268        for(;;) {
269            if(g*g > n)
270                g ^= c;
271            c >>= 1;
272            if(c == 0)
273                return g;
274            g |= c;
275        }
276    }
277    
278  #endif                                                  /* _GLOBAL_H_ */  #endif                                                  /* _GLOBAL_H_ */

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.27

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