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

Diff of /trunk/xvidcore/src/global.h

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

revision 3, Fri Mar 8 02:46:11 2002 UTC revision 156, Fri May 3 00:45:10 2002 UTC
# Line 1  Line 1 
1  #ifndef _GLOBAL_H_  #ifndef _GLOBAL_H_
2  #define _GLOBAL_H_  #define _GLOBAL_H_
3    
4    #include "xvid.h"
5  #include "portab.h"  #include "portab.h"
6    
7  /* --- macroblock stuff --- */  /* --- macroblock modes --- */
8    
9  #define MODE_INTER              0  #define MODE_INTER              0
10  #define MODE_INTER_Q    1  #define MODE_INTER_Q    1
# Line 13  Line 14 
14  #define MODE_STUFFING   7  #define MODE_STUFFING   7
15  #define MODE_NOT_CODED  16  #define MODE_NOT_CODED  16
16    
17    /* --- bframe specific --- */
18    
19    #define MODE_DIRECT                     0
20    #define MODE_INTERPOLATE        1
21    #define MODE_BACKWARD           2
22    #define MODE_FORWARD            3
23    #define MODE_DIRECT_NONE_MV     4
24    
25    
26  typedef struct  typedef struct
27  {  {
28          int x;          uint32_t bufa;
29          int y;          uint32_t bufb;
30  } VECTOR;          uint32_t buf;
31            uint32_t pos;
32            uint32_t *tail;
33            uint32_t *start;
34            uint32_t length;
35    }
36    Bitstream;
37    
38    
39  #define MBPRED_SIZE  15  #define MBPRED_SIZE  15
# Line 36  Line 52 
52          int mode;          int mode;
53          int quant;              // absolute quant          int quant;              // absolute quant
54    
55            int field_dct;
56            int field_pred;
57            int field_for_top;
58            int field_for_bot;
59    
60          // encoder specific          // encoder specific
61    
62          VECTOR pmvs[4];          VECTOR pmvs[4];
63          int dquant;          int dquant;
64          int cbp;          int cbp;
65    
66            // bframe stuff
67    
68            VECTOR b_mvs[4];
69            VECTOR b_pmvs[4];
70    
71            int mb_type;
72            int dbquant;
73    
74  } MACROBLOCK;  } MACROBLOCK;
75    
76  static __inline int8_t get_dc_scaler(int32_t quant, uint32_t lum)  static __inline int8_t get_dc_scaler(int32_t quant, uint32_t lum)
# Line 76  Line 105 
105      return dc_scaler;      return dc_scaler;
106  }  }
107    
108    
109    // useful macros
110    
111    #define MIN(X, Y) ((X)<(Y)?(X):(Y))
112    #define MAX(X, Y) ((X)>(Y)?(X):(Y))
113    #define ABS(X)    (((X)>0)?(X):-(X))
114    #define SIGN(X)   (((X)>0)?1:-1)
115    
116    
117  #endif /* _GLOBAL_H_ */  #endif /* _GLOBAL_H_ */

Legend:
Removed from v.3  
changed lines
  Added in v.156

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