[svn] / branches / dev-api-3 / xvidcore / src / global.h Repository:
ViewVC logotype

Diff of /branches/dev-api-3/xvidcore/src/global.h

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

trunk/xvidcore/src/global.h revision 156, Fri May 3 00:45:10 2002 UTC branches/dev-api-3/xvidcore/src/global.h revision 579, Sat Oct 5 21:37:44 2002 UTC
# Line 21  Line 21 
21  #define MODE_BACKWARD           2  #define MODE_BACKWARD           2
22  #define MODE_FORWARD            3  #define MODE_FORWARD            3
23  #define MODE_DIRECT_NONE_MV     4  #define MODE_DIRECT_NONE_MV     4
24    #define MODE_DIRECT_NO4V        5
25    
26    
27  typedef struct  typedef struct
# Line 43  Line 44 
44  {  {
45          // decoder/encoder          // decoder/encoder
46          VECTOR mvs[4];          VECTOR mvs[4];
         uint32_t sad8[4];               // SAD values for inter4v-VECTORs  
         uint32_t sad16;                 // SAD value for inter-VECTOR  
47    
48      short int pred_values[6][MBPRED_SIZE];      short int pred_values[6][MBPRED_SIZE];
49      int acpred_directions[6];      int acpred_directions[6];
# Line 59  Line 58 
58    
59          // encoder specific          // encoder specific
60    
61            VECTOR mv16;
62          VECTOR pmvs[4];          VECTOR pmvs[4];
63            VECTOR qmvs[4];                         // mvs in quarter pixel resolution
64    
65            int32_t sad8[4];                        // SAD values for inter4v-VECTORs
66            int32_t sad16;                          // SAD value for inter-VECTOR
67    
68          int dquant;          int dquant;
69          int cbp;          int cbp;
70    
71          // bframe stuff          // bframe stuff
72    
73          VECTOR b_mvs[4];          VECTOR b_mvs[4];
74          VECTOR b_pmvs[4];  //      VECTOR b_pmvs[1];
75    
76            // bframe direct mode
77    
78    //      VECTOR directmv[4];
79    //      VECTOR deltamv;
80    
81          int mb_type;          int mb_type;
82          int dbquant;          int dbquant;
83    
84  } MACROBLOCK;          // stuff for block based ME (needed for Qpel ME)
85            // backup of last integer ME vectors/sad
86    
87  static __inline int8_t get_dc_scaler(int32_t quant, uint32_t lum)          VECTOR i_mv16;
88  {          VECTOR i_mvs[4];
     int8_t dc_scaler;  
89    
90          if(quant > 0 && quant < 5) {          int32_t i_sad8[4];      // SAD values for inter4v-VECTORs
91          dc_scaler = 8;          int32_t i_sad16;        // SAD value for inter-VECTOR
                 return dc_scaler;  
         }  
92    
         if(quant < 25 && !lum) {  
         dc_scaler = (quant + 13) >> 1;  
                 return dc_scaler;  
93          }          }
94    MACROBLOCK;
95    
96          if(quant < 9) {  static __inline int8_t
97          dc_scaler = quant << 1;  get_dc_scaler(uint32_t quant,
98                  return dc_scaler;                            uint32_t lum)
99          }  {
100            if (quant < 5)
101                    return 8;
102    
103      if(quant < 25) {          if (quant < 25 && !lum)
104          dc_scaler = quant + 8;                  return (quant + 13) / 2;
105                  return dc_scaler;  
106          }          if (quant < 9)
107                    return 2 * quant;
108    
109            if (quant < 25)
110                    return quant + 8;
111    
112          if(lum)          if(lum)
113                  dc_scaler = (quant << 1) - 16;                  return 2 * quant - 16;
114          else          else
115          dc_scaler = quant - 6;                  return quant - 6;
   
     return dc_scaler;  
116  }  }
117    
   
118  // useful macros  // useful macros
119    
120  #define MIN(X, Y) ((X)<(Y)?(X):(Y))  #define MIN(X, Y) ((X)<(Y)?(X):(Y))

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

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